Simple file content validation #12
@ -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' +
|
||||
|
Loading…
x
Reference in New Issue
Block a user