Skip to content

Library: download and upload from the right-click menu, a folder as a zip - #736

Merged
Matthew Shaxted (mattshax) merged 1 commit into
mainfrom
library-menu-transfer
Nov 20, 2026
Merged

Matthew Shaxted (mattshax) merged 1 commit into
mainfrom
library-menu-transfer

Conversation

@mattshax

Copy link
Copy Markdown
Member

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

  • A file: Download.
  • A folder: Upload files…, Upload a folder… and Download as zip.
    • The upload entries are disabled in a read-only library, with the reason on hover, as New folder is.
    • With All libraries, the top of the tree holds the libraries, so it offers neither.
  • Uploads go through the same transfer queue as + Add, with progress below the tree. The Linux and Windows window lists a folder with its own chooser, as + Add does.

Folder zip

GET /api/kb/download?path=…&folder=1 sends 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.

  • For a library on another system, the zip is built from its index, and each file is fetched as its own download would be.
  • check=1 returns 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.
  • Limits:
    • 50,000 files or 8 GB on this host;
    • 500 files or 1 GB for a library elsewhere;
    • over either, a 413.
  • A request without folder=1 for a folder is still refused with a 400.

Saving the file

Downloads start from a link with a download attribute, which each surface saves:

  • a browser keeps it with its downloads;
  • the macOS window saves the attachment to Downloads;
  • the Linux and Windows window fetches it through its bridge and reports where it went.

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

  • Go tests:
    • the zip's contents, with hidden entries, excluded folders and links leaving the folder all left out;
    • a nested folder's name;
    • a file still downloading as itself;
    • a path leaving the library refused;
    • a remote folder zipped from its index;
    • the 413;
    • the size check.
  • Web tests: a file download, a folder sized and then downloaded, the refusal and empty-folder notices.
  • In a test Studio, driven in Chromium and in WebKit (the macOS window's engine):
    • both menus;
    • Download as zip (the zip held what the Library shows, and nothing hidden or excluded) and its notice;
    • Upload files… and Upload a folder… into a folder, the folder keeping its structure;
    • a file's Download.
  • The desktop bridge vets clean as a Windows build. This host has no GTK headers, so CI builds the Linux window.

HELP.md, REFERENCE.md and README are updated.

… 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.
@mattshax
Matthew Shaxted (mattshax) merged commit d7b219a into main Nov 20, 2026
14 checks passed
@mattshax
Matthew Shaxted (mattshax) deleted the library-menu-transfer branch November 20, 2026 17:33
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