File handler class for uploading and downloading files and FileReference Events.
TODO Needs thorough testing to confirm event handling works properly.
public _imageType:Objectpublic _textType:Objectpublic _docTypes:Objectpublic _webTypes:Objectpublic _flashTypes:Objectpublic _audioTypes:Objectpublic _videoTypes:Objectpublic _anyType:Objectpublic _allTypes:Arraypublic onSelectEVENT:Stringpublic onCancelEVENT:Stringpublic onOpenEVENT:Stringpublic onProgressEVENT:Stringpublic onCompleteEVENT:Stringpublic onHTTPErrorEVENT:Stringpublic onIOErrorEVENT:Stringpublic onSecurityErrorEVENT:Stringpublic 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):Booleanprompt user to save a remote file
url | (String) url of remote file |
Boolean - success status of download
public function browse(type:Array):BooleanDisplays 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):BooleanStart 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.