File handler class for uploading and downloading files and FileReference Events.
TODO Needs thorough testing to confirm event handling works properly.
public _imageType:Object
public _textType:Object
public _docTypes:Object
public _webTypes:Object
public _flashTypes:Object
public _audioTypes:Object
public _videoTypes:Object
public _anyType:Object
public _allTypes:Array
public onSelectEVENT:String
public onCancelEVENT:String
public onOpenEVENT:String
public onProgressEVENT:String
public onCompleteEVENT:String
public onHTTPErrorEVENT:String
public onIOErrorEVENT:String
public onSecurityErrorEVENT:String
public creationDate:Date [Read Only]
public creator:String [Read Only]
public modificationDate:Date [Read Only]
public name:String [Read Only]
public size:Number [Read Only]
public type:String [Read Only]
public function download(url:String, defaultFileName:String):Boolean
prompt user to save a remote file
url | (String) url of remote file |
Boolean - success status of download
public function browse(type:Array):Boolean
Displays a file-browsing dialog box for the user to select a file to upload.
type | (Array) optional array of allowed filetypes. If none is passed the _allTypes class array will be used. |
Boolean - true if the dialogue box was successfully displayed.
public function upload(url:String, uploadDataFieldName:String, testUpload:Boolean):Boolean
Start a file upload (100mb max is supported by the FlashPlayer). Note: On some browsers, URL strings are limited in length. Lengths greater than 256 characters may fail on some browsers or servers.
url | (String) the server url to upload file to. |
testUpload | (Boolean) optional 0byte upload test for windows Flashplayer only. The default is false. |
Boolean - false if upload fails for any reason.