Experimental
An array of MwFile objects to be included in the ZIP file.
Optional
fileName: string = 'archive.zip'The name of the generated ZIP file, default archive.zip.
A promise that resolves to an MwFile object representing the generated ZIP file.
const files = await showUploadFile(ctx, {
fileUploadTitle: 'Upload a file',
uploadButton: 'Upload',
text: 'Upload a file to get started',
minFileLimit: 2,
maxFileLimit: 5,
});
if (!files) {
return;
}
const zip = await generateZipFile(files);
const filePath = path.join(os.homedir(), 'Downloads');
await fileToDrive(zip, filePath);
Generates a ZIP file from an array of MwFile objects.