diff --git a/public/index.html b/public/index.html index 5e04414..3ec0aaa 100644 --- a/public/index.html +++ b/public/index.html @@ -1128,14 +1128,14 @@ async function startUpload() { // ============================================================ // HTTP MULTI-PART UPLOAD -// Small files (<= 32 MB): single presigned PUT direct to S3. -// Large files (> 32 MB): S3 multipart with presigned part URLs — -// browser PUTs each 32 MB chunk directly to S3, 6 in parallel. +// Small files (<= 8 MB): single presigned PUT direct to S3. +// Large files (> 8 MB): S3 multipart with presigned part URLs — +// browser PUTs each 8 MB chunk directly to S3, 6 in parallel. // Node only signs URLs; file data never touches the server. // Falls back to server-proxied chunked upload if presigned fails. // ============================================================ const UPLOAD_CONCURRENCY = 6; // concurrent file uploads -const CHUNK_SIZE = 32 * 1024 * 1024; // 32 MB per chunk +const CHUNK_SIZE = 8 * 1024 * 1024; // 8 MB per chunk const CHUNKS_PARALLEL = 6; // concurrent chunks per file // Helper: PUT a blob to a presigned URL, return ETag from response @@ -1161,7 +1161,7 @@ async function uploadFilePresigned(item, idx) { const mime = item.file.type || 'application/octet-stream'; const totalParts = Math.max(1, Math.ceil(item.file.size / CHUNK_SIZE)); - // Small files (<= 32 MB): single presigned PUT + // Small files (<= 8 MB): single presigned PUT if (totalParts === 1) { setFileStatus(idx, 'uploading', 'Getting URL\u2026'); const pre = await api('POST', '/api/presigned', { @@ -1193,7 +1193,7 @@ async function uploadFilePresigned(item, idx) { }); } - // Large files (> 32 MB): presigned multipart \u2014 browser \u2192 S3 direct + // Large files (> 8 MB): presigned multipart \u2014 browser \u2192 S3 direct setFileStatus(idx, 'uploading', 'Initiating\u2026'); const init = await api('POST', '/api/desktop/multipart/init', { filename: item.name, prefix: selectedPrefix, size: item.file.size, totalParts,