Files Download as .zip
Download as .zip
Several picked, or a folder, are downloaded as one .zip. It is made in the page: the server says what goes in it, and each file’s bytes go from the bucket into the archive as they are read.
On this page
How it is made
POST /zipgives what goes in it: each file, each folder with what is in it, at their paths, what may not be read left out.- Text is deflated by the browser’s own CompressionStream; what is compressed already (pictures, PDFs, Word documents) is kept as it is. ZIP64 for one past 4 GiB.
- Past 500 MB, where the browser lets a page write a file, it is written to one the person chooses, nothing of it held in the page.
What was left out
A file that could not be read is left out, the archive made of the rest, and the toast says how many, with a button to download them on their own.
From a link
Someone with a link to a folder downloads it whole, or one of its folders, the same way, without signing in.
In code
import { downloadZip } from '@rebofiles/drive';
const { files, size, missed } = await downloadZip(client, ids, { name: 'Contracts', onProgress, signal });