mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-01 02:59:47 +08:00
Downloading a dataset from a remote (S3-like) object store blocks a web thread while the whole object is pulled into the local cache before any bytes are sent, causing 504 timeouts on large files and making objects larger than the cache undownloadable. Add an opt-in `enable_direct_download` flag per object store backend. When set, plain whole-file downloads are served by redirecting the client (302) to a short-lived presigned URL generated by the backing store, removing Galaxy from the download path entirely. - ObjectStore.get_direct_download_url() gates on the flag and forwards content-disposition/content-type into the presigned URL so the client receives the right filename; implemented for boto3, s3, and azure. - DatasetsService.display() returns a redirect for non-archive whole-file download requests; previews, chunked display, extra-files access, and composite/archived downloads continue to stream as before. - The single-file-vs-archive decision is shared with the existing streamed-download path via Data.is_archive_download(). Refs galaxyproject/galaxy#19255