diff --git a/resources/views/form/rapport-zenova/1787826441-be2c0187-515b-4b5d-a97a-91d1648b0379.blade.php b/resources/views/form/rapport-zenova/1787826441-be2c0187-515b-4b5d-a97a-91d1648b0379.blade.php index 76e5cceb..917062c5 100644 --- a/resources/views/form/rapport-zenova/1787826441-be2c0187-515b-4b5d-a97a-91d1648b0379.blade.php +++ b/resources/views/form/rapport-zenova/1787826441-be2c0187-515b-4b5d-a97a-91d1648b0379.blade.php @@ -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('');