Repository navigation
Library: download and upload from the right-click menu, a folder as a zip - #736
Merged
Merged
Conversation
… zip A file's right-click menu has Download, and a folder's has Upload files…, Upload a folder… and Download as zip, so a file need not be opened to save it and a folder takes files without the Add panel. The download route zips a folder when the request names it a folder (folder=1): what the Library shows in it, without names that start with a dot, the build and cache folders the Library leaves out, or links out of the folder. A folder in a library on another system is zipped from its index, each file fetched as a download of it is. check=1 answers the zip's name, file count and size first, so a folder over the limits (50,000 files or 8 GB here, 500 files or 1 GB elsewhere) is a notice and not a saved file holding the error. Without folder=1 a folder is refused as before. The download starts from a link with a download attribute, which the browser, the macOS window and the Linux and Windows window each save. The Linux and Windows window keeps five minutes for the Studio's answer and allows two hours for the transfer, as a folder's zip is made while it is sent. Upload a folder… uses the window's own folder chooser where the page's cannot pick a folder, as + Add does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Right-clicking a library file or folder now offers download and upload, so a file need not be opened first to save it, and a folder can take files without the Add panel.
Menu
Folder zip
GET /api/kb/download?path=…&folder=1sends a zip of what the Library shows in the folder. It leaves out names that start with a dot and the build and cache folders the Library hides, and it does not follow symbolic links, so nothing outside the folder goes in.check=1returns the zip's name, file count and size. The menu asks for this first, so a folder that is too large or empty shows a notice, and no file holding the error is saved.folder=1for a folder is still refused with a 400.Saving the file
Downloads start from a link with a
downloadattribute, which each surface saves:The bridge's single five-minute limit is now five minutes for the Studio's answer and two hours for the transfer, since a folder's zip is written while it is sent.
Checked
HELP.md, REFERENCE.md and README are updated.