To Support this project just checkout a related website:
Examples: Try it yourself!
The plugin provides very simple integration in 2 methods:
a) By using the accept and maxlength properties.
b) By using the class property
Take a look at the examples below and decide which method is best for you.
Using accept and maxlength properties
Using class property
Multi-lingual support
Uploading files - The server-side script
Javascript cannot be used to upload files - this plugin will only go as far
as helping the user select the files to upload. When the form is submitted,
it's up to you to have a server-side script that will actually
upload the files.
Please do not email me asking how this can be done!!!
There is plenty of information out there and you can easily
find it on Google.
But because I'm such a nice guy, I've put a quick list of the best links here:
ASP users: FreeASPUpload - Free, easy to use and no component required. This is my favourite.
2008-Jan-14: BUG 1251 (details)
Conflicting IDs on multiple instances of the MultiFile plugin
Wrong parameters sent to event handlers:
This was an oversight - plugin was sending the wrong parameters to event handlers.
Problem is now fixed.
IE6/7, Extension validation:
Error message is displayed but plugin fails to clear the invalid value.
This causes the invalid value to be submitted with the form.
Opera/Safari, Extension validation:
Error message is displayed but plugin fails to clear the invalid value.
This causes the invalid value to be submitted with the form.
Thanks to Adrian Wróbel (adrian [dot] wrobel [at] gmail.com).
Changes: What's new?
2008-Mar-17:
Some upload scripts don't properly handle the empty input (last in the list).
So I added some properties/methods for easier form integration.
$.MultiFile.autoIntercept - array of known jQuery plugins to intercept (default: 'submit', 'ajaxSubmit', 'validate');
$.MultiFile.intercept(plugin) - intercepts a jQuery plugin / anonymous function
$.MultiFile.disableEmpty() - disable empty inputs (required for some upload scripts)
$.MultiFile.reEnableEmpty() - re-enables empty inputs
2008-Jan-10:
Renamed variables, using meaningful names inatead of single letters
Pro: The code is now easier to read/understand
Con: The plugin is a little bigger (a few bytes)
2007-July:
Added file extension validation.
Usage: class="multi accept-jpg|gif|png"
Note: You must ALWAYS validate submitted information on the server...
2007-May:
Added multi-lingual support.
Works via class string with MetaData plugin.
2007-May:
Added events easier customization, triggered in the following order.
When a file is selected:
onFileSelect: when user selects a file. Return false to stop event.
onFileAppend: file has been accepted, about to update DOM
afterFileAppend: self explanatory...
afterFileSelect: self explanatory...
When a file is removed:
onFileRemove: about to remove file element from DOM. Return false to stop event.
afterFileRemove: just removed file element from DOM