PackageTop Level
Classpublic class Uploader
InheritanceUploader Inheritance YUIAdapter Inheritance flash.display.Sprite

A wrapper for the Astra Uploader components to allow them to be used by the YUI library.



Public Properties
 PropertyDefined by
  simultaneousUploadLimit : Number = 2
Determines how many files will be uploaded simultaneously
Uploader
Protected Properties
 PropertyDefined by
 InheritedelementID : String
The element id that references the SWF in the HTML.
YUIAdapter
 InheritedjavaScriptEventHandler : String
The globally accessible JavaScript function that accepts events through ExternalInterface.
YUIAdapter
Public Methods
 MethodDefined by
  
Uploader(debugfield:TextField = null)
Uploader
  
browse(allowMultiple:Boolean = false, filterArray:Array = null):void
Triggers a prompt for the user to browse their file system to select files to be uploaded.
Uploader
  
cancel(fileID:String = null):void
Cancels either an upload of the file corresponding to a given fileID, or in the absence of the specified fileID, all active files being uploaded.
Uploader
  
clearFileList():Boolean
Clears the set of files that had been selected for upload
Uploader
  
removeFile(fileID:String):Object
Removes the file from the set to be uploaded
Uploader
  
upload(fileID:String, url:String, method:String = "GET", vars:Object = null, fieldName:String = "Filedata"):void
Uploads a file corresponding to a specified ID to a specified path where a script handles writing to the server.
Uploader
  
uploadAll(url:String, method:String = "GET", vars:Object = null, fieldName:String = "Filedata"):void
Uploads all files to a specified path where a script handles writing to the server.
Uploader
Protected Methods
 MethodDefined by
 Inherited
To be overridden by subclasses to add ExternalInterface callbacks.
YUIAdapter
 Inherited
log(message:Object, category:String = null):void
Sends a log message to the YUI Logger.
YUIAdapter
 Inherited
showFatalError(message:Object):void
YUIAdapter
Property detail
simultaneousUploadLimitproperty
public var simultaneousUploadLimit:Number = 2

Determines how many files will be uploaded simultaneously

Constructor detail
Uploader()constructor
public function Uploader(debugfield:TextField = null)Parameters
debugfield:TextField (default = null)
Method detail
browse()method
public function browse(allowMultiple:Boolean = false, filterArray:Array = null):void

Triggers a prompt for the user to browse their file system to select files to be uploaded.

Parameters
allowMultiple:Boolean (default = false) — Whether to allow the user to select more than one file
 
filterArray:Array (default = null) — An array of filter objects, each with description, and extensions properties which determine which files the user is allowed to select
cancel()method 
public function cancel(fileID:String = null):void

Cancels either an upload of the file corresponding to a given fileID, or in the absence of the specified fileID, all active files being uploaded.

Parameters
fileID:String (default = null) — The ID of the file to be uploaded
clearFileList()method 
public function clearFileList():Boolean

Clears the set of files that had been selected for upload

Returns
Boolean
removeFile()method 
public function removeFile(fileID:String):Object

Removes the file from the set to be uploaded

Parameters
fileID:String — The ID of the file to be removed

Returns
Object
upload()method 
public function upload(fileID:String, url:String, method:String = "GET", vars:Object = null, fieldName:String = "Filedata"):void

Uploads a file corresponding to a specified ID to a specified path where a script handles writing to the server.

Parameters
fileID:String — The ID of the file to be uploaded
 
url:String — The path to the serverside script
 
method:String (default = "GET") — The HTTP submission method. Possible values are "GET" and "POST"
 
vars:Object (default = null) — An object containing data to be sent along with the request
 
fieldName:String (default = "Filedata") — The field name that precedes the file data in the upload POST operation. The uploadDataFieldName value must be non-null and a non-empty String.
uploadAll()method 
public function uploadAll(url:String, method:String = "GET", vars:Object = null, fieldName:String = "Filedata"):void

Uploads all files to a specified path where a script handles writing to the server.

Parameters
url:String — The ID of the file to be uploaded
 
method:String (default = "GET") — The path to the serverside script
 
vars:Object (default = null) — The HTTP submission method. Possible values are "GET" and "POST"
 
fieldName:String (default = "Filedata") — An object containing data to be sent along with the request