Updated commit with all the suggested changes

This commit is contained in:
amishabagri 2025-02-03 22:03:36 +00:00
commit 9e9a695e26

View file

@ -69,7 +69,7 @@ export default defineComponent({
try{ try{
// Check if the file has an acceptable extension // Check if the file has an acceptable extension
const allowedExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp",".heic",".avif"]; const allowedExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp",".heic",".avif"];
const fileExtension = fileObject.name.split(".").pop()?.toLowerCase(); const fileExtension = fileObject.name.split(".").pop()?.toLowerCase();
// If the file extension is not in the allowed extensions list, show an error message // If the file extension is not in the allowed extensions list, show an error message
if (!fileExtension || !allowedExtensions.includes(`.${fileExtension}`)) { if (!fileExtension || !allowedExtensions.includes(`.${fileExtension}`)) {