Files
galaxy/lib
Nuwan Goonasekera 5663a29a5a Add direct-download redirects for object store datasets
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
2026-07-07 23:10:03 +05:30
..
2026-06-25 15:12:05 +01:00