diff --git a/process/blobHandler/process.js b/process/blobHandler/process.js index 6092c676875883a3f54019b98a27bca2c61f86da..2f1900a43a0ef9d8db21c3958030e1864a3e6b50 100644 --- a/process/blobHandler/process.js +++ b/process/blobHandler/process.js @@ -11,7 +11,7 @@ import("system.vars"); * This process uses the id of the dataset as filename. */ -var path = vars.get("$sys.serverdata") + "/binaryfiles/" +var path = vars.get("$sys.serverdata") + "/binaryfiles/"; var operation = null; switch (vars.get("$local.operation")) @@ -27,9 +27,6 @@ switch (vars.get("$local.operation")) break; case "READ": operation = readBlob; - break; - default: - break; } if (operation) @@ -45,7 +42,7 @@ if (operation) */ function createBlob (path, filename) { - _writeBlob(path + filename ) + _writeBlob(path + filename); } /* @@ -56,7 +53,7 @@ function createBlob (path, filename) */ function deleteBlob (path, filename) { - fileIO.remove(path + filename ); + fileIO.remove(path + filename); } /* @@ -67,7 +64,7 @@ function deleteBlob (path, filename) */ function updateBlob (path, filename) { - _writeBlob(path + filename ); + _writeBlob(path + filename); } /* @@ -83,7 +80,7 @@ function readBlob (path, filename) var fullPath = path + filename; var fromWhereCond = new SqlBuilder(SqlUtils.getBinariesAlias()).from("ASYS_BINARIES").where("ASYS_BINARIES.ID", filename); - sqlHelper = new SqlMaskingUtils(); + var sqlHelper = new SqlMaskingUtils(); if (fileIO.exists(fullPath) && fileIO.canRead(fullPath)) { @@ -91,7 +88,7 @@ function readBlob (path, filename) result.string(blob); } // copy to reuse it inside of the if with other select field - else if (fromWhereCond.copy().select(sqlHelper.bindataLength("BINDATA")).cell() > 0) + else if (fromWhereCond.copy().select(sqlHelper.binDataLength("BINDATA")).cell() > 0) { blob = fromWhereCond.select("BINDATA").cell(); result.string(blob);