I'm trying to upload an image using ant-design. This is an example I just found on our community.
Using customRequest in Ant design file upload
this is Demo link
https://stackblitz.com/edit/so-58128062-upload-progress-4gyng9
I'm trying to add
const beforeUpload = () => {
return false; // STOP all actions including Upload and progres/preview
//Using Hooks to update the state to the current filelist
//filelist - [{uid: "-1",url:'Some url to image'}]
};
to block all upload process/preview actions. But It's not working.
Thank you for helping
Yeah, I found it.
Just need set default list on onChange event to are empty then OK
Hope to help someone if you want similar behaviour
demo