Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When onSubmit returns false, you cannot upload anymore file #191

Open
pintilies opened this issue Apr 11, 2019 · 1 comment
Open

When onSubmit returns false, you cannot upload anymore file #191

pintilies opened this issue Apr 11, 2019 · 1 comment

Comments

@pintilies
Copy link

Just make a test with onSubmit, and return false depending on some external conditions, at the next upload, nothing happens anymore.

onSubmit: function()
{
if (!$("#someInput").val())
{
alert("Cannot upload before you type something in the input field");
return false;
}
},

That is because progressQ has already 1 item, which is never removed.

What I did, I have added this at the line 752:

progressQ.pop();

The best implementation, is that you should never create a statusbar in the first place, but only after onSubmit was succesful.

@JengEnji
Copy link

JengEnji commented Aug 27, 2019

May I know which line do you mean for line 752?

I try add progressQ.pop(); at the code below

      pd.statusbar.append("<div class='" + s.errorClass + "'>" + s.uploadErrorStr + "</div>");
      pd.cancel.show()
      progressQ.pop();
      form.remove();

but it has no effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants