LPology / Simple-Ajax-Uploader

Javascript file upload plugin with progress bar support. Works in all major browsers, including IE7+, Chrome, Firefox, Safari, and Opera. No dependencies - use it with or without jQuery.
995 stars 267 forks source link

uploader.submit() does not error if not file is selected. #101

Closed mouse0270 closed 8 years ago

mouse0270 commented 9 years ago

I have a form where if the user does not select a file I will default it to a standard image. The problem is I would like to check this after a file has been uploaded.

But if I call uploader.submit() and there was no file selected there is no type of error throw. How do I tell that uploader failed to upload because no image was selected.

LPology commented 8 years ago

Sorry for such a long delay in replying to this.

Version 2.4 of the plugin includes a new callback function called onBlankSubmit() which gets called when a user attempts to submit without selecting a file.

Thanks for your input.