From 1f5fb8c7c3c3e7b3515f6c95849ed2b6bf1ff867 Mon Sep 17 00:00:00 2001 From: victorAnumudu Date: Tue, 28 Nov 2023 11:50:16 +0100 Subject: [PATCH] upload file bug fixed --- src/components/UploadProduct/index.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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`} } } -- 2.34.1