forked from blueimp/jQuery-File-Upload
-
Notifications
You must be signed in to change notification settings - Fork 0
API v4
blueimp edited this page Aug 16, 2011
·
5 revisions
The basic initialization of the File Upload plugin is by calling it on an element node (usually the file upload form or a container node holding the form):
$('#file_upload').fileUpload();The first (or second, if the first is the string 'init') parameter can be an object setting various Options v4.
See Options v4 documentation.
To remove the file upload widget from the element node, call the destroy method:
$('#file_upload').fileUpload('destroy');This will also remove any added event handlers.
Usually, file uploads are invoked by selecting files via the file upload button or dropping files on the drop zone.
However it is also possible to upload one or multiple files programmatically:
$('#file_upload').fileUpload('upload', files);The second parameter (files) can hold a File or Blob object or an array of these objects.