MCPcopy Create free account
hub / github.com/bytebase/bytebase / downloadZip

Function downloadZip

frontend/src/react/components/DataExportButton.tsx:149–159  ·  view source on GitHub ↗
(
  contents: DownloadContent[],
  format: ExportFormat
)

Source from the content-addressed store, hash-verified

147};
148
149const downloadZip = async (
150 contents: DownloadContent[],
151 format: ExportFormat
152) => {
153 const zip = new JSZip();
154 for (const entry of contents) {
155 zip.file(entry.filename, toBlob(entry, format));
156 }
157 const zipFile = await zip.generateAsync({ type: "blob" });
158 saveAs(zipFile, `download_${dayjs().format("YYYY-MM-DDTHH-mm-ss")}.zip`);
159};
160
161const downloadAll = async (
162 contents: DownloadContent[],

Callers 1

downloadAllFunction · 0.85

Calls 1

toBlobFunction · 0.85

Tested by

no test coverage detected