DojoUploader

The DojoUploader widget allows you to select local files and upload to the server.

The file will be received by the server such as Tomcat and placed in a temporary folder. You need to move it from there to the upload destination by the server side program. Please refer to https://dojotoolkit.org/reference-guide/1.10/dojox/form/Uploader.html#id18 for the general principle of server side program. Also check out DojoUploaderSample in the Dojo sample project and the sample Java™ servlet in the com.ibm.egl.rui.dojo.samples_2.x.x\WebContent\utils\uploader as the Java server side program sample.

Properties

text
The text label for the uploader button.
multiple
Whether to select and upload multiple files at one time.
showInput
Where to show the input view. The following values are available:
  • Dojolib.INPUT_NONE
  • Dojolib.INPUT_BEFORE
  • Dojolib.INPUT_AFTER
showLabel
Whether to show the uploader button label.
uploadOnSelect
Whether to upload the files immediately after selection.
uploadUrl
The server side program URL to deal with the file upload.

Events

onAbort
Specifies an event that occurs when the file upload aborts.
onBegin
Specifies an event that occurs when the file upload begins.
onChange
Specifies an event that occurs when the file selection changes.
onComplete
Specifies an event that occurs when the file upload completes.
onError
Specifies an event that occurs when error happens.
onProgress
Specifies an event that occurs when the file upload is in progress.

Functions

getFileList
Returns the information of selected files.
reset
Resets the file selection.
upload
Uploads selected files.