for (const fileId of fileIds) const fileMeta = await drive.files.get( fileId, fields: 'name,mimeType' ); let fileStream;
archive.append(fileStream, name: fileMeta.data.name + '.pdf' ); downloading multiple files from google drive
res.attachment('download.zip'); archive.pipe(res); for (const fileId of fileIds) const fileMeta = await drive
const handleDownload = async () => const response = await googleDriveApi.downloadMultiple(selectedFiles.map(f => f.id)); const blob = await response.blob(); const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'drive_download.zip'; a.click(); ; name: fileMeta.data.name + '.pdf' )
import useState from 'react'; import googleDriveApi from './api'; const BulkDownload = () => { const [selectedFiles, setSelectedFiles] = useState([]); const [progress, setProgress] = useState({});