You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can we prevent the user from selecting an image in certain situations?
My problem is that I succeed on preventing the upload of the image to the server but the UI is still loaded with the image selected. I don't know how to clear or avoid showing it.
The plugin says we should return a Promise when using the function uploadByFile. What have I tried:
uploadByFile(file)
{
alert('Error, you cannot proceed');
// Does not work
return Promise.reject(new Error(''));
// Does not work
return new Promise((resolve, reject) => {});
// Does not work
return false;
},
The text was updated successfully, but these errors were encountered:
How can we prevent the user from selecting an image in certain situations?
My problem is that I succeed on preventing the upload of the image to the server but the UI is still loaded with the image selected. I don't know how to clear or avoid showing it.
See JSFiddle example
The plugin says we should return a Promise when using the function
uploadByFile
. What have I tried:The text was updated successfully, but these errors were encountered: