API Documentation

Upload

Themable, WAI-ARIA accessible javascript upload with mouse and keyboard interactions for navigation. For examples, check out Upload demo page.

Properties

Key Type Required Description
autoSubmit boolean No Whether or not to start automatically upload. Defaults to true
data object No Additional data who are send alongside with the upload. Defaults to {}
label string No Text label to display. Defaults to Upload
method string No HTTP method to use. Defaults to POST
multiple boolean No Whether to upload a multiple files at once. Defaults to false
name string No The name of input file element. Defaults to file
url string Yes URL used to submit the form and handle the upload. Defaults to upload.php

Methods

Method Arguments Description
process .zinoUpload("process") Programmatically starts the upload process.
destroy .zinoUpload("destroy") Remove the upload functionality completely. This will return the element back to its pre-init state.
option .zinoUpload("option", optionName, [value]) Get or set any upload option. If no value is specified, will act as a getter.
option .zinoUpload("option", options) Set multiple upload options at once by providing an options object.

Events

Event Arguments Description
change event, ui This event is triggered when the input file value has changed. Set $(this).data("result", false); if you want to prevent submit event trigger.
complete event, ui This event is triggered when the upload process has been completed.
submit event, ui This event is triggered when the upload process attempts to start. Set $(this).data("result", false); if you want to prevent the upload.