diff --git a/src/components/UploadProduct/index.jsx b/src/components/UploadProduct/index.jsx index 27896c2..6f59b9d 100644 --- a/src/components/UploadProduct/index.jsx +++ b/src/components/UploadProduct/index.jsx @@ -154,7 +154,7 @@ export default function UploadProduct({uploadTypes}) { // action: 'WRENCHBOARD_RESOURCE_MYFILES', action: 11307 } - + if(!isValidFile(imgDetails, uploadTypes?.data)){ // FUNCTION TO CHECK IF FILE TYPE IS VALID setRequestStatus({loading: false, status: null, message: 'File type not supported'}) return setTimeout(()=>{ @@ -633,6 +633,6 @@ const isValidFileSize = (file, supportedFile=[]) => { return {status: false, message: `File must not exceed ${valid[0].max_size_mb}MB`} } }else{ - return false + return {status: false, message: `Cannot read file size, try again`} } }