dojox/form/uploader/_Flash (version 1.10)

Summary

A mixin for dojox/form/Uploader that utilizes a Flash SWF for handling to upload in IE. All other browsers will use the HTML5 plugin, unless force="flash" is used, then Flash will be used in all browsers. force="flash" is provided because Flash has some features that HTML5 does not yet have. But it is still not recommended because of the many problems that Firefox and Webkit have with the Flash plugin.

All properties and methods listed here are specific to the Flash version only.

Property Summary

  • deferredUploading(Flash only) throttles the upload to a certain amount of files at a time.
  • devModeRe-implemented. devMode increases the logging, adding style tracing from the SWF.
  • isDebugIf true, outputs traces from the SWF to console.
  • preventCacheIf true, then flash request is sent with a value that changes with each request (timestamp)
  • serverTimeoutThe amount of time given to the uploaded file to wait for a server response.
  • skipServerCheckIf true, will not verify that the server was sent the correct format.
  • swfPathPath to SWF.

Method Summary

Event Summary

  • _onFlashBlur(fileArray)
  • onFileChange(fileArray) Stub - Flash-specific event.
  • onFileProgress(fileArray) Stub - Flash-specific event.
  • onLoad(uploader) Stub - SWF has been downloaded 100%.
  • onReady(uploader) Stub - Fired when embedFlash has created the Flash object, but it has not necessarilly finished downloading, and is ready to be communicated with.

Properties

deferredUploading

(Flash only) throttles the upload to a certain amount of files at a time. By default, Flash uploads file one at a time to the server, but in parallel. Firefox will try to queue all files at once, leading to problems. Set this to the amount to upload in parallel at a time. Generally, 1 should work fine, but you can experiment with queuing more than one at a time. This is of course ignored if selectMultipleFiles equals false.

devMode

Re-implemented. devMode increases the logging, adding style tracing from the SWF.

isDebug

If true, outputs traces from the SWF to console. What exactly gets passed is very relative, and depends upon what traces have been left in the DEFT SWF.

preventCache

If true, then flash request is sent with a value that changes with each request (timestamp)

serverTimeout

The amount of time given to the uploaded file to wait for a server response. After this amount of time, the onComplete is fired but with a 'server timeout' error in the returned item.

skipServerCheck

If true, will not verify that the server was sent the correct format. This can be safely set to true. The purpose of the server side check is mainly to show the dev if they've implemented the different returns correctly.

swfPath

Path to SWF. Can be overwritten or provided in djConfig.

Methods

_change(fileArray)
Parameter Type Description
fileArray undefined
_complete(fileArray)
Parameter Type Description
fileArray undefined
_connectFlash()

Subscribing to published topics coming from the Flash uploader.

_createFlashUploader()

Internal. Creates Flash Uploader

_error(err)
Parameter Type Description
err undefined
_getCustomEvent()
Returns:object
_progress(f)
Parameter Type Description
f undefined
flashReset()
getFlashFileList()

Returns list of currently selected files

Returns:undefined
postMixInProperties()
uploadFlash(formData)

Uploads selected files. Alias "upload()" should be used instead.

Parameter Type Description
formData Object
Optional

Events

_onFlashBlur(fileArray)
Parameter Type Description
fileArray undefined
onFileChange(fileArray)

Stub - Flash-specific event. Fires on each selection of files and only provides the files selected on that event - not all files selected, as with HTML5

Parameter Type Description
fileArray undefined
onFileProgress(fileArray)

Stub - Flash-specific event. Fires on progress of upload and only provides a file-specific event

Parameter Type Description
fileArray undefined
onLoad(uploader)

Stub - SWF has been downloaded 100%.

Parameter Type Description
uploader dojox/form/FileUploader
onReady(uploader)

Stub - Fired when embedFlash has created the Flash object, but it has not necessarilly finished downloading, and is ready to be communicated with.

Parameter Type Description
uploader dojox/form/FileUploader
Error in the documentation? Can’t find what you are looking for? Let us know!