File: src/lib/storage/download.ts
downloadObject fetches the full S3 object body via the /storage/api/download endpoint, buffers it as a Blob in browser memory, then triggers a programmatic anchor click. This is simpler than streaming directly to disk but means the entire object must fit in browser memory before the save dialog appears. Acceptable for the current object sizes; for very large files (multiple GiB) this will cause memory pressure. Long-term fix: use the File System Access API createWritable() to stream bytes directly to disk without buffering, with a fallback to the current Blob approach for Firefox (which does not support showSaveFilePicker).
File: src/lib/storage/download.ts
downloadObject fetches the full S3 object body via the /storage/api/download endpoint, buffers it as a Blob in browser memory, then triggers a programmatic anchor click. This is simpler than streaming directly to disk but means the entire object must fit in browser memory before the save dialog appears. Acceptable for the current object sizes; for very large files (multiple GiB) this will cause memory pressure. Long-term fix: use the File System Access API createWritable() to stream bytes directly to disk without buffering, with a fallback to the current Blob approach for Firefox (which does not support showSaveFilePicker).