LFFE-18 upload file jpeg

This commit is contained in:
2023-11-07 14:04:49 +03:30
parent 1d1f0a1ffe
commit 5fabccf339
6 changed files with 8 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("MachinaryOffice.upload_file_format")}`, (value) => {
// if (!value) return true; // Skip if no file is provided
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types
const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type);
})
});

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("NavganProvinceManager.upload_file_format")}`, (value) => {
if (!value) return true
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types
const allowedTypes = ['image/jpeg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type);
})
})
@@ -71,7 +71,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
setShowAddIcon(false);
}
};
console.log(formik.values.confirm_img)
return (
<>
<DialogContent>

View File

@@ -31,7 +31,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
return value.size <= 2 * 1024 * 1024;
})
.test('fileType', `${t("PassengerBoss.upload_file_format")}`, (value) => {
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types
const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type);
})
});

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("PassengerOffice.upload_file_format")}`, (value) => {
if (!value) return true
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types
const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type);
})
})

View File

@@ -25,7 +25,7 @@ const ConfirmContent = ({rowId, mutate, setOpenConfirmDialog}) => {
})
.test('fileType', `${t("TransportationAssistance.upload_file_format")}`, (value) => {
if (!value) return true
const allowedTypes = ['image/jpg', 'image/png', 'application/pdf']; // Define your allowed file types
const allowedTypes = ['image/jpg', 'image/jpeg', 'image/png', 'application/pdf']; // Define your allowed file types
return allowedTypes.includes(value.type);
})
})