jQuery File Uploader JavaScript API: Upload dialog and panel
Upload dialog is a modal window on top of your page. It contains a set of tabs with different upload sources and file preview. Upload panel is the same thing, just in a non-modal form.
Open Upload dialog
You can use openDialog
to open a standalone upload dialog over your page:
Where,
files
, a file, file array or group that will be shown as already uploaded.tab
, a name of a tab opened by default when no predefined files are present.settings
, a settings object.
Open Upload panel
openPanel
is used to open an upload panel at any point on your page:
Where,
container
, a selector or DOM element that will be replaced with an upload panel. This will be put back on your panel resolving.files
, a file, file array or group that will be shown as already uploaded.tab
, a name of a tab opened by default when no predefined files are present.settings
, settings object.
Dialog API
Both dialog and panel instances implement the extended jQuery promise interface showing progress on a user tab.
In addition to the jQuery promise interface, dialog and panel objects have the following properties and methods,
You can find code examples for solving typical tasks like a Check if a file was added or removed when working with the uploading widget in the instruction JS code snippets and CSS tricks.
Discover more customization examples.