Zenova : Glipiq & Sitazit Tracker form changes 1
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m39s Details

This commit is contained in:
Farhan Pathan 2026-09-02 10:24:38 +05:30
parent 128c100ac7
commit a7ad163299
1 changed files with 3 additions and 5 deletions

View File

@ -297,26 +297,24 @@ $('#field-select_brand').on('change', function () {
$('#field-file_upload').on('change', function () {
$('#field-file_upload, #field-upload_sitazit_rxn, #field-upload_glipiq_rxn').on('change', function () {
let file = this.files[0];
if (file) {
let allowedTypes = [
'application/pdf',
'image/png',
'image/jpg',
'image/jpeg'
];
let maxSize = 10 * 1024 * 1024; // 10 MB
// Type validation
if (!allowedTypes.includes(file.type)) {
alert('Only PDF, 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('');