Optional file upload

107 views
Skip to first unread message

d...@iomi.net

unread,
Apr 3, 2014, 4:59:33 PM4/3/14
to jquery-f...@googlegroups.com
Hi,

I'm trying to integrate jQuery File Upload into an existing form.  I have it set up and working great, however, I'd like the file upload to be optional so if no files are selected the rest of the form fields are still submitted.

I've searched long and hard about this and can find no solution at all - only lots of people with the same problem, so it doesn't appear that the plug-in supports this.  So plan B is to just try to hack it some other way.

Would there be a way to bind the upload start event to a custom button, but intercept that button to detect whether any files have been selected first; if so then upload everything as normal; if not then call a non-file-upload function to handle the file-less upload?  Does this sound like the best solution to achieve this?

I didn't anticipate this being such a huge problem, so I'm seriously under pressure now for a solution so any pointers would be very much appreciated.

Many thanks!

Jared Galanis

unread,
Apr 9, 2015, 1:10:32 AM4/9/15
to jquery-f...@googlegroups.com
Hey Dan,

Just wondering if you ever got this working?  If so, and you wouldn't mind sharing your solution, that would be most appreciated.  Thanks!

Jared

Dan Bramall

unread,
Apr 9, 2015, 3:19:07 AM4/9/15
to jquery-f...@googlegroups.com
Hey Jared,

No, unfortunately I didn't.  I abandoned this plug-in and just used a plain old file upload input.

Sorry I can't be more help.  It seems like there's so much interest in being able to do this, it's a shame nobody with 'the skills' hasn't tackled it.

Dan
Reply all
Reply to author
Forward
0 new messages