diff --git a/lib/galaxy/webapps/base/api.py b/lib/galaxy/webapps/base/api.py index 1cc03d05141..01127f21fbb 100644 --- a/lib/galaxy/webapps/base/api.py +++ b/lib/galaxy/webapps/base/api.py @@ -88,11 +88,17 @@ class GalaxyFileResponse(FileResponse): background: Optional["BackgroundTask"] = None, filename: Optional[str] = None, stat_result: Optional[os.stat_result] = None, - method: Optional[str] = None, content_disposition_type: str = "attachment", ) -> None: super().__init__( - path, status_code, headers, media_type, background, filename, stat_result, method, content_disposition_type + path=path, + status_code=status_code, + headers=headers, + media_type=media_type, + background=background, + filename=filename, + stat_result=stat_result, + content_disposition_type=content_disposition_type, ) self.headers["accept-ranges"] = "bytes" self.xsendfile = self.nginx_x_accel_redirect_base or self.apache_xsendfile diff --git a/lib/galaxy/webapps/galaxy/api/datasets.py b/lib/galaxy/webapps/galaxy/api/datasets.py index b207a3ca350..35488d66eed 100644 --- a/lib/galaxy/webapps/galaxy/api/datasets.py +++ b/lib/galaxy/webapps/galaxy/api/datasets.py @@ -290,7 +290,7 @@ class FastAPIDatasets: assert isinstance(display_data, IOBase) file_name = getattr(display_data, "name", None) assert file_name - return GalaxyFileResponse(file_name, headers=headers, method=request.method) + return GalaxyFileResponse(file_name, headers=headers) @router.get( "/api/histories/{history_id}/contents/{history_content_id}/display", @@ -374,7 +374,7 @@ class FastAPIDatasets: if isinstance(display_data, IOBase): file_name = getattr(display_data, "name", None) if file_name: - return GalaxyFileResponse(file_name, headers=headers, method=request.method) + return GalaxyFileResponse(file_name, headers=headers) elif isinstance(display_data, ZipstreamWrapper): return StreamingResponse(display_data.response(), headers=headers) elif isinstance(display_data, bytes):