Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support downloading multiple files #169

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YDX-2147483647
Copy link

@YDX-2147483647 YDX-2147483647 commented Sep 29, 2023

When downloading multiple files, Send concatenates all files into a raw stream. This PR checks the files manifest, and split the stream back to normal files.

Technical details

Research about the sever side

#134 (comment)

Implementation

If we are downloading multiple files (if metadata.mime() == "send-archive"):

  1. Allocate a temporary directory
  2. Prepare paths: Check each file in the manifest, and ask to overwrite if necessary
  3. Download the archive (a raw stream) to temp dir
  4. Post Process: Split the archive to output dir (fn split(archive: File, files: Vec<ManifestFile>))

Other changes

Additional information

Resolves #134

Please merge timvisee/ffsend-api#82 first if you want to merge this PR.

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.

Download of a ZIP seems to just concatenate content files
1 participant