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

return false onSubmit clears the queue #198

Open webmasterMeyers opened 7 years ago

webmasterMeyers commented 7 years ago

If I return false in the onSubmit function (because extra form elements are not filled out) the queue is cleared and a second attempt to upload after adding missing info fails because there is nothing to upload.

My work around is to call a validation function with the submit button, and after that, call uploader.submit() . The form button needs to have onclick="return false" to prevent Simple-Ajax-Uploader from uploading the file even if the validation function is returning false.