diff --git a/lib/galaxy/config/schemas/config_schema.yml b/lib/galaxy/config/schemas/config_schema.yml index f2d398bcaba5..823780a856f2 100644 --- a/lib/galaxy/config/schemas/config_schema.yml +++ b/lib/galaxy/config/schemas/config_schema.yml @@ -1886,9 +1886,17 @@ mapping: required: False desc: | The upload store is a temporary directory in which files uploaded by the - tus middleware or server will be placed. + tus middleware or server for user uploads will be placed. Defaults to new_file_path if not set. + tus_upload_store_job_files: + type: str + required: False + desc: | + The upload store is a temporary directory in which files uploaded by the + tus middleware or server for remote job files (Pulsar) will be placed. + Defaults to tus_upload_store if not set. + chunk_upload_size: type: int default: 10485760 diff --git a/lib/galaxy/webapps/galaxy/api/job_files.py b/lib/galaxy/webapps/galaxy/api/job_files.py index ab22ba72f05c..ae5ac6fe5fe7 100644 --- a/lib/galaxy/webapps/galaxy/api/job_files.py +++ b/lib/galaxy/webapps/galaxy/api/job_files.py @@ -103,7 +103,11 @@ def create(self, trans, job_id, payload, **kwargs): elif "session_id" in payload: # code stolen from basic.py session_id = payload["session_id"] - upload_store = trans.app.config.tus_upload_store or trans.app.config.new_file_path + upload_store = ( + trans.app.config.tus_upload_store_job_files + or trans.app.config.tus_upload_store + or trans.app.config.new_file_path + ) if re.match(r"^[\w-]+$", session_id) is None: raise ValueError("Invalid session id format.") local_filename = os.path.abspath(os.path.join(upload_store, session_id)) diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 3900e6f58d6a..48771bf2a73d 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -1102,7 +1102,9 @@ def wrap_in_middleware(app, global_conf, application_stack, **local_conf): TusMiddleware, kwargs={ "upload_path": urljoin(f"{application_stack.config.galaxy_url_prefix}/", "api/job_files/resumable_upload"), - "tmp_dir": application_stack.config.tus_upload_store or application_stack.config.new_file_path, + "tmp_dir": application_stack.config.tus_upload_store_job_files + or application_stack.config.tus_upload_store + or application_stack.config.new_file_path, "max_size": application_stack.config.maximum_upload_file_size, }, )