Loading client/src/utils/uploadbox.js +9 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,14 @@ function submitPayload(payload, cnf) { }); } function buildFingerprint(cnf) { async function customFingerprint(file, options) { return ["tus-br", file.name, file.type, file.size, file.lastModified, cnf.data.history_id].join("-"); } return customFingerprint; } function tusUpload(data, index, tusEndpoint, cnf) { const startTime = performance.now(); const chunkSize = cnf.chunkSize; Loading @@ -31,6 +39,7 @@ function tusUpload(data, index, tusEndpoint, cnf) { console.debug(`Starting chunked upload for ${file.name} [chunkSize=${chunkSize}].`); const upload = new tus.Upload(file, { endpoint: tusEndpoint, fingerprint: buildFingerprint(cnf), chunkSize: chunkSize, metadata: data.payload, onError: function (error) { Loading lib/galaxy/tools/data_fetch.py +5 −0 Original line number Diff line number Diff line Loading @@ -502,6 +502,11 @@ class UploadConfig: if purge_source: try: shutil.move(path, new_path) # Drop .info file if it exists try: os.remove(f"{path}.info") except FileNotFoundError: pass except OSError as e: # We may not have permission to remove converted_path if e.errno != errno.EACCES: Loading lib/galaxy/webapps/galaxy/api/_fetch_util.py +1 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ def validate_and_normalize_targets(trans, payload): item["in_place"] = run_as_real_user elif src == "files": item["in_place"] = run_as_real_user item["purge_source"] = True # Small disagreement with traditional uploads - we purge less by default since whether purging # happens varies based on upload options in non-obvious ways. Loading Loading
client/src/utils/uploadbox.js +9 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,14 @@ function submitPayload(payload, cnf) { }); } function buildFingerprint(cnf) { async function customFingerprint(file, options) { return ["tus-br", file.name, file.type, file.size, file.lastModified, cnf.data.history_id].join("-"); } return customFingerprint; } function tusUpload(data, index, tusEndpoint, cnf) { const startTime = performance.now(); const chunkSize = cnf.chunkSize; Loading @@ -31,6 +39,7 @@ function tusUpload(data, index, tusEndpoint, cnf) { console.debug(`Starting chunked upload for ${file.name} [chunkSize=${chunkSize}].`); const upload = new tus.Upload(file, { endpoint: tusEndpoint, fingerprint: buildFingerprint(cnf), chunkSize: chunkSize, metadata: data.payload, onError: function (error) { Loading
lib/galaxy/tools/data_fetch.py +5 −0 Original line number Diff line number Diff line Loading @@ -502,6 +502,11 @@ class UploadConfig: if purge_source: try: shutil.move(path, new_path) # Drop .info file if it exists try: os.remove(f"{path}.info") except FileNotFoundError: pass except OSError as e: # We may not have permission to remove converted_path if e.errno != errno.EACCES: Loading
lib/galaxy/webapps/galaxy/api/_fetch_util.py +1 −0 Original line number Diff line number Diff line Loading @@ -185,6 +185,7 @@ def validate_and_normalize_targets(trans, payload): item["in_place"] = run_as_real_user elif src == "files": item["in_place"] = run_as_real_user item["purge_source"] = True # Small disagreement with traditional uploads - we purge less by default since whether purging # happens varies based on upload options in non-obvious ways. Loading