Glenmark (Form 4)
Specific Folder FTP Upload / ftp-deploy (push) Successful in 32s Details

This commit is contained in:
zeeshan 2026-05-26 16:26:15 +05:30
parent b80be9ff7f
commit 5fd1b86619
1 changed files with 21 additions and 0 deletions

View File

@ -353,7 +353,28 @@
syncLOBGTotal();
$('#field-upload_supporting_document').on('change', function () {
let file = this.files[0];
if (file) {
let allowedTypes = ['image/png', 'image/jpg', 'image/jpeg'];
let maxSize = 10 * 1024 * 1024; // 10 MB
// Type validation
if (!allowedTypes.includes(file.type)) {
alert('Only PNG, JPG, and JPEG files are allowed.');
$(this).val('');
return;
}
// Size validation
if (file.size > maxSize) {
alert('File size should not exceed 10 MB.');
$(this).val('');
return;
}
}
});
});