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

Implement API for downloading multiple files from storage as a ZIP file #3445

Open
nowgnuesLee opened this issue Jan 14, 2025 — with Lablup-Issue-Syncer · 0 comments
Assignees

Comments

@nowgnuesLee
Copy link

nowgnuesLee commented Jan 14, 2025

Motivation  

  • Currently, even though there are many files, only one file can be downloaded at a time. For convenience, it seems necessary to implement a feature that allows multiple files to be downloaded at once.

Required Features

  • When multiple files are selected, I plan to send a single ZIP file containing those files to the client (there’s an existing function that streams ZIP files, so I intend to reuse that).
  • To compress multiple files, we need a common parent directory for the files, so I intend to change the folder structure as follows:
    • Target
      folder/file.png
    • Current
      folder.zip extract> file.png
    • Updated
      folder.zip extract> folder/file.png

Impact  

  • Using the token received from storage, I intend to update the existing download_directory_as_archive function so that it can handle not only directories but also multiple files when creating a ZIP file.

Testing Scenarios  

  • Test if a single file/folder is returned correctly files as individual files and folders as ZIP files.
  • Test if multiple files (files + folders) are returned in a ZIP file named after the common parent folder.
@nowgnuesLee nowgnuesLee self-assigned this Jan 14, 2025
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

No branches or pull requests

1 participant