The question is related to jquery file upload plugin from blueimp
I am building a form where the file uploads are optional. It turns out I cannot post form when the
Setting SingleFileUploads to false didn't help much with JQuery file uploader since there seems to be a bug as discussed here. So I set that thing back to true.
I separated the inputs into two separate forms - one for text fields input and one for files(which goes through JQuery file uploader). For the text fields form, I kept a visible button the user can click. For the other one, I hid the button. So once the user clicks the visible button, I submit only the text input and create a database record in the backend(this is done using an AJAX call) and in the success field of AJAX call, I .click() the hidden button if the file count is more than 0.