ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Show Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes
com.adobe.icc.editors.managers 

FileUploadManager  - AS3 Asset Composer

Packagecom.adobe.icc.editors.managers
Classpublic class FileUploadManager
InheritanceFileUploadManager Inheritance EventDispatcher Inheritance Object

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10
Runtime Versions: AIR (unsupported), Flash Player 10.2

The FileUploadManager handles the upload of files to the CM server. There are instances where a file needs to be associated with an asset e.g. an XDP file is associated with Layout, an JPEG file is associated with Image module. The files need to uploaded to the server via the upload servlet.

FileUploadManager abstracts the servlet path and authentication details and lets you upload files with a simplified API.



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  contentFile : File
The FileReference object associated with the upload.
FileUploadManager
  file : FileModel
Represents the object encapsulating the uploaded file details.
FileUploadManager
  fileReference : FileReference
The fileReference instance that opens a pop up to browse for files to be uploaded to server.
FileUploadManager
  fileTypes : Array
The file types filter that should apply to the Browse File dialog.
FileUploadManager
  FILE_UPLOAD_URL : String = "http://localhost:4502"
[static] The URL where the files will be uploaded.
FileUploadManager
  isUploading : Boolean
Indicates whether a file upload is currenly in progress.
FileUploadManager
  userManager : ISSOManager
[static] The instance of ISSOManager which holds the information about current logged in user.
FileUploadManager
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
upload(fileTypes:Array = null):void
Starts the file upload on client.
FileUploadManager
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
  Dispatched to indicate the occurence of a fault during the upload process.FileUploadManager
  Dispatched when the file upload completes.FileUploadManager
  Dispatched when the file has started to upload.FileUploadManager
Property Detail

contentFile

property
contentFile:File

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The FileReference object associated with the upload.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get contentFile():File
    public function set contentFile(value:File):void

file

property 
public var file:FileModel

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Represents the object encapsulating the uploaded file details.

FILE_UPLOAD_URL

property 
public static var FILE_UPLOAD_URL:String = "http://localhost:4502"

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The URL where the files will be uploaded.

fileReference

property 
fileReference:FileReference

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The fileReference instance that opens a pop up to browse for files to be uploaded to server.

This property can be used as the source for data binding. When this property is modified, it dispatches the propertyChange event.



Implementation
    public function get fileReference():FileReference
    public function set fileReference(value:FileReference):void

fileTypes

property 
public var fileTypes:Array

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The file types filter that should apply to the Browse File dialog.

isUploading

property 
public var isUploading:Boolean

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Indicates whether a file upload is currenly in progress. This flag stays true till the time a file is being uploaded.

This property can be used as the source for data binding. When this property is modified, it dispatches the uploadEnd event.

userManager

property 
userManager:ISSOManager

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

The instance of ISSOManager which holds the information about current logged in user.



Implementation
    public static function get userManager():ISSOManager
    public static function set userManager(value:ISSOManager):void
Method Detail

upload

()method
public function upload(fileTypes:Array = null):void

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10.0
Runtime Versions: AIR (unsupported), Flash Player 10.2

Starts the file upload on client.

Invoking this method launches the File Browse dialog and lets the user choose a file for upload. The upload starts immediately after the user chooses a file for upload.

Parameters

fileTypes:Array (default = null) — The file types filter that should apply to the Browse File dialog.
Event Detail

fault

Event
Event Object Type: flash.events.Event
property Event.type = flash.events.Event

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10
Runtime Versions: AIR (unsupported), Flash Player 10.2

Dispatched to indicate the occurence of a fault during the upload process.

uploadEnd

Event  
Event Object Type: flash.events.Event
property Event.type = flash.events.Event

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10
Runtime Versions: AIR (unsupported), Flash Player 10.2

Dispatched when the file upload completes.

uploadStart

Event  
Event Object Type: flash.events.Event
property Event.type = flash.events.Event

Language Version: ActionScript 3.0
Product Version: Asset Composer Building Block 10
Runtime Versions: AIR (unsupported), Flash Player 10.2

Dispatched when the file has started to upload.