(bytes)
| 355 | |
| 356 | // Format the file size |
| 357 | function formatFileSize(bytes) { |
| 358 | if (bytes < 1024) return bytes + ' B' |
| 359 | if (bytes < 1024 * 1024) return (bytes / 1024).toFixed(1) + ' KB' |
| 360 | return (bytes / (1024 * 1024)).toFixed(1) + ' MB' |
| 361 | } |
| 362 | |
| 363 | // Batch download as ZIP |
| 364 | async function downloadAllAsZip() { |