AJAX/XHR/iFrame upload component

Description

Upload single or multiple files using either an XHR POST or (in case of Opera and IE) regular POSTs
through an invisible iFrame.
Triggered events:

Event

Description

JQueryEventConstants.AJAX_UPLOAD ("ajaxFileUpload")

Triggered in case of an XHR file upload. The event handler may return renderable objects such as
MultiZoneUpdate. null is also possible and will result in a regular rendering of the
success json.

JQueryEventConstants.NON_XHR_UPLOAD ("fileUpload")

Triggered in case of a regular file upload using the iFrame fallback.
The event handler cannot return a MultiZoneUpdate or similar. Only JSONObjects are supported.
If you need other parts of your page to rerender after the upload took place you can
return a JSONObject with the following structure to trigger a custom event (which will be a separate XHR call):

Defines the maximum size of one single file in bytes. If the number has a trailing K, M or G the limit will be calculated accordingly (base 2). A value of 10M will result a limit of 10 * 1024 * 1024 byte = 10 MiB. No limit by default.

maxConnections

false

int

prop

3

Limits the amount of parallel uploads.

params

false

JSONObject

prop

Gives you the full control over all parameters. Please read the documentation of valum's file-uploader. Besides the already mentioned parameters the messages can also be overridden by either specifying them in your own global message bundles or by passing the translated texts as parameters.

API for the 'params' component parameter

Description

Note: If you define your own templates make sure you keep the original css classes.
The file-uploader script looks for them to apply its functions (qq-upload-drop-area for the drop-area for example).