How to Upload Multiple Files in a Web Application with Progress Bar, Multiple Fields and Form Validation Using jQuery, PHP & Uploadify
December 2011 · 16 Comments
There are a few tutorials out there on how to use Uploadify to upload files in a web application. However, I haven't found one that integrates Uploadify into a form with other fields, so that the form validates and submits correctly whether images are uploaded or not.
My goal was to write a script that accomplishes the following objectives:
- Upload files with a progress bar
- Associate the uploaded files with the other fields within the form (a blog entry in this case)
- Submit the form and upload the files only if all required fields have been filled out
- Submit the form even if no file has been selected to upload
- Do all the above even when a user hits the 'Enter' key instead of just clicking the submit button
» View Demo
» Download the Files
One downside to the script is that it requires Flash for the upload progress bar, but this shouldn't be a problem for the vast majority of users and there are ways to display a file upload field for non-Flash users.
Click here for a script that uses APC for implementing a file upload progress bar instead of Flash.
Categories
· Mobile (1) · Projects (60) · Tutorials (14) · PHP (14) · jQuery (5) · MySQL (4)
View by date
· View All · March 2013 · February 2013 · October 2012 · September 2012 · August 2012 · July 2012 · May 2012 · March 2012 · February 2012 · January 2012 · December 2011 · November 2011 · October 2011 · September 2011 · July 2011 · June 2011 · May 2011 · April 2011 · March 2011 · February 2011 · January 2011 · December 2010 · November 2010 · October 2010 · September 2010 · July 2010 · May 2010 · April 2010 · February 2010 · January 2010 · November 2009 · August 2009 · July 2009