Simple file content validation #12

Merged
niat8586 merged 6 commits from simple-client-validation into develop 2025-02-04 11:32:33 +01:00
Showing only changes of commit 652f6ec22a - Show all commits

View File

@ -46,7 +46,6 @@ function validateFile() {
const fileInput = document.getElementById('file');
const filePath = fileInput.value;
const allowedExtensions = /(\.mp3|\.mp4|\.mpeg|\.mpga|\.m4a|\.wav|\.webm|\.ogg)$/i;
const maxSize = 10 * 1024 * 1024; // 10 MB
if (!allowedExtensions.exec(filePath)) {
alert('File type is not one of the recommended types. We recommend using MP3, MP4, MPEG, MPGA, M4A, WAV, WEBM, OGG.\n' +