Merge branch 'fixed-upload-payload' of WrenchBoard/Users-Wrench into master
This commit is contained in:
@@ -37,7 +37,7 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals
|
||||
}
|
||||
|
||||
axios.post(`${process.env.REACT_APP_MEDIA_LINK}/upload/task`,formData).then(res => {
|
||||
if(res.data.status < 1){
|
||||
if(res.data.internal_return < 0){
|
||||
inputFile.current.value = null
|
||||
setRequestStatus({loading: false, status:false, message:'upload failed'})
|
||||
setTimeout(()=>{
|
||||
@@ -84,7 +84,7 @@ export default function AttachFile({data='', fontSize='text-sm', showOnData=fals
|
||||
<span className={`text-[10px] ${requestStatus.status ? 'text-emerald-600' : 'text-red-500'}`}>{requestStatus.message}</span>
|
||||
}
|
||||
</div>
|
||||
<label htmlFor='file' className={`dark:text-white cursor-pointer text-[12px] py-1 px-2 rounded-full border ${ requestStatus.loading && 'pointer-events-none'}`}>+ Add</label>
|
||||
<label htmlFor='file' className={`text-black bg-[#f8ffd4] cursor-pointer text-[12px] py-1 px-2 rounded-full border ${ requestStatus.loading && 'pointer-events-none'}`}>+ Add Files</label>
|
||||
</div>
|
||||
<div className='w-full p-2 rounded-2xl bg-slate-100'>
|
||||
<div className='text-[12px] w-full h-20 overflow-y-auto flex flex-col gap-2'>
|
||||
|
||||
Reference in New Issue
Block a user