Skip to content

[PB-6940]: shared folder multipart download - #2208

Open
terrerox wants to merge 4 commits into
masterfrom
feature/shared-folder-multipart-download
Open

terrerox wants to merge 4 commits into
masterfrom
feature/shared-folder-multipart-download

Conversation

@terrerox

@terrerox terrerox commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Files inside a public shared folder now use multipart download when they are 2 GiB or larger, like shared files do since #2040.

  • downloadChunk and multipartDownload support shares encrypted with a bucket key.
  • New downloadFileBySize picks multipart or a single request by file size. It is used for single files, multiple items and folder zips.
  • Large files are streamed into the zip instead of being buffered and cached.
  • The zip now fails instead of hanging when a file download errors.

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as ne
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or upda
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addr
  • QA Passed

Multipart chunk downloads only derived the file key from a mnemonic, so
files shared with a bucket key could not be fetched in ranges.
downloadChunk now uses downloadFileWithBucketKey when options.bucketKey
is set, and multipartDownload gets a branch for credentials plus a
bucket key.
A file stream that errored while being piped into the zip left the zip
open forever. The error is now forwarded to the zip stream, and the
streamSaver sink no longer reports it as an unhandled rejection before
close() awaits it.
Files of 2 GiB or more inside a shared folder were fetched in a single
request and, in folder zips, buffered into a Blob and cached. A new
downloadFileBySize helper picks multipart download by size; the public
share download and the shared-folder zip use it, and large files are
streamed into the zip without being kept in memory or cached.
@terrerox
terrerox requested review from a team, CandelR and larryrider as code owners October 12, 2026 23:09
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 78854b5
Status: ✅  Deploy successful!
Preview URL: https://ff3e110e.drive-web.pages.dev
Branch Preview URL: https://feature-shared-folder-multip.drive-web.pages.dev

View logs

@terrerox terrerox self-assigned this Oct 12, 2026
@sonarqubecloud

Copy link
Copy Markdown

@terrerox terrerox changed the title [_]: feature/shared folder multipart download [PB-6940]: shared folder multipart download Oct 12, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant