Raise audio upload limit to 2 GB per file.

Update validation, dropzone checks, Docker PHP ini, and docs so multi-hour recordings can be uploaded.
This commit is contained in:
ben
2026-08-12 17:42:55 +02:00
parent 771ee8db5a
commit e81a27cb8f
8 changed files with 63 additions and 7 deletions
+9 -3
View File
@@ -3,6 +3,8 @@
* before submitting the form.
*/
const MAX_FILE_BYTES = 2 * 1024 * 1024 * 1024;
export function uploadDropzone({ existingFingerprints = [] } = {}) {
const acceptExt = ['.mp3', '.wav', '.ogg', '.oga', '.flac', '.m4a', '.mp4', '.aac', '.webm', '.wma', '.aiff', '.aif'];
const known = new Set(existingFingerprints);
@@ -50,7 +52,7 @@ export function uploadDropzone({ existingFingerprints = [] } = {}) {
continue;
}
if (file.size > 100 * 1024 * 1024) {
if (file.size > MAX_FILE_BYTES) {
skippedTooLarge++;
continue;
}
@@ -80,7 +82,7 @@ export function uploadDropzone({ existingFingerprints = [] } = {}) {
if (skippedUnsupported > 0) {
this.error = 'Skipped unsupported file type. Use common audio formats only.';
} else if (skippedTooLarge > 0) {
this.error = 'Skipped a file larger than 100 MB.';
this.error = 'Skipped a file larger than 2 GB.';
}
if (skippedDuplicates > 0) {
@@ -153,7 +155,11 @@ export function uploadDropzone({ existingFingerprints = [] } = {}) {
return (bytes / 1024).toFixed(1) + ' KB';
}
return (bytes / (1024 * 1024)).toFixed(1) + ' MB';
if (bytes < 1024 * 1024 * 1024) {
return (bytes / (1024 * 1024)).toFixed(1) + ' MB';
}
return (bytes / (1024 * 1024 * 1024)).toFixed(2) + ' GB';
},
};
}
+1 -1
View File
@@ -35,7 +35,7 @@
>
<p class="text-sm font-medium text-stone-800">Drop audio files here</p>
<p class="mt-1 text-sm text-stone-600">or click to browse</p>
<p class="mt-3 text-xs text-stone-500">MP3, WAV, OGG, FLAC, M4A, AAC, WebM, WMA, or AIFF · max 100 MB each · up to 50 files</p>
<p class="mt-3 text-xs text-stone-500">MP3, WAV, OGG, FLAC, M4A, AAC, WebM, WMA, or AIFF · max 2 GB each · up to 50 files</p>
</div>
<input