Namespace | plupload |
Class | Uploader |
Property | Defined By |
---|---|
features : Object
Map of features that are available for the uploader runtime.
| Uploader |
files : Array
Current upload queue, an array of File instances.
| Uploader |
id : String
Unique id for the Uploader instance.
| Uploader |
runtime : String
Current runtime name.
| Uploader |
settings : Object
Object with name/value settings.
| Uploader |
state : Number
Current state of the total uploading progress.
| Uploader |
Total progess information.
| Uploader |
Method | Defined By |
---|---|
Uploader(settings:Object)
Constructs a new uploader instance.
| Uploader |
bind(name:String, func:function, scope:Object):void
Adds an event listener by name.
| Uploader |
destroy():void
Destroys Plupload instance and cleans after itself.
| Uploader |
Returns the specified file object by id.
| Uploader |
init():void
Initializes the Uploader instance and adds internal event listeners.
| Uploader |
refresh():void
Refreshes the upload instance by dispatching out a refresh event to all runtimes.
| Uploader |
removeFile(file:
File):void
Removes a specific file.
| Uploader |
splice(start:Number, length:Number):Array
Removes part of the queue and returns the files removed.
| Uploader |
start():void
Starts uploading the queued files.
| Uploader |
stop():void
Stops the upload of the queued files.
| Uploader |
trigger(name:String, Multiple:Object..):void
Dispatches the specified event name and it's arguments to all listeners.
| Uploader |
unbind(name:String, func:function):void
Removes the specified event listener.
| Uploader |
unbindAll():void
Removes all event listeners.
| Uploader |
Event | Defined By |
---|---|
Fires when just before a file is uploaded.
| Uploader |
Fires when file chunk is uploaded.
| Uploader |
Fires when destroy method is called.
| Uploader |
Fires when a error occurs.
| Uploader |
FilesAdded(uploader:
Uploader, files:Array)
Fires while when the user selects files to upload.
| Uploader |
FilesRemoved(uploader:
Uploader, files:Array)
Fires while a file was removed from queue.
| Uploader |
Fires when a file is successfully uploaded.
| Uploader |
Fires when the current RunTime has been initialized.
| Uploader |
Fires after the init event incase you need to perform actions there.
| Uploader |
QueueChanged(uploader:
Uploader)
Fires when the file queue is changed.
| Uploader |
Fires when the silverlight/flash or other shim needs to move.
| Uploader |
StateChanged(uploader:
Uploader)
Fires when the overall state is being changed for the upload queue.
| Uploader |
UploadComplete(uploader:
Uploader, files:Array)
Fires when all files in a queue are uploaded.
| Uploader |
Fires when a file is to be uploaded by the runtime.
| Uploader |
Fires while a file is being uploaded.
| Uploader |
public features : Object
public id : String
public runtime : String
public settings : Object
public state : Number
public total : QueueProgress
public function Uploader(settings:Object)
settings:Object | Initialization settings, to be used by the uploader instance and runtimes. |
public function bind(name:String, func:function, scope:Object):void
name:String | Event name to listen for. |
func:function | Function to call ones the event gets fired. |
scope:Object | Optional scope to execute the specified function in. |
public function destroy():void
public function getFile(id:String):File
id:String | File id to look for. |
public function init():void
public function refresh():void
public function removeFile(file:File):void
file:File | File to remove from queue. |
public function splice(start:Number, length:Number):Array
start:Number | (Optional) Start index to remove from. |
length:Number | (Optional) Lengh of items to remove. |
public function start():void
public function stop():void
public function trigger(name:String, Multiple:Object..):void
name:String | Event name to fire. |
Multiple:Object.. | arguments to pass along to the listener functions. |
public function unbind(name:String, func:function):void
name:String | Name of event to remove. |
func:function | Function to remove from listener. |
public function unbindAll():void
public event BeforeUpload(uploader:Uploader, file:File)
uploader:Uploader | Uploader instance sending the event. |
file:File | File to be uploaded. |
public event ChunkUploaded(uploader:Uploader, file:File, response:Object)
uploader:Uploader | Uploader instance sending the event. |
file:File | File that the chunk was uploaded for. |
response:Object | Object with response properties. |
public event Destroy(uploader:Uploader)
uploader:Uploader | Uploader instance sending the event. |
public event Error(uploader:Uploader, error:Object)
uploader:Uploader | Uploader instance sending the event. |
error:Object | Contains code, message and sometimes file and other details. |
public event FilesAdded(uploader:Uploader, files:Array)
uploader:Uploader | Uploader instance sending the event. |
files:Array | Array of file objects that was added to queue/selected by the user. |
public event FilesRemoved(uploader:Uploader, files:Array)
uploader:Uploader | Uploader instance sending the event. |
files:Array | Array of files that got removed. |
public event FileUploaded(uploader:Uploader, file:File, response:Object)
uploader:Uploader | Uploader instance sending the event. |
file:File | File that was uploaded. |
response:Object | Object with response properties. |
public event Init(uploader:Uploader)
uploader:Uploader | Uploader instance sending the event. |
public event PostInit(uploader:Uploader)
uploader:Uploader | Uploader instance sending the event. |
public event QueueChanged(uploader:Uploader)
uploader:Uploader | Uploader instance sending the event. |
public event Refresh(uploader:Uploader)
uploader:Uploader | Uploader instance sending the event. |
public event StateChanged(uploader:Uploader)
uploader:Uploader | Uploader instance sending the event. |
public event UploadComplete(uploader:Uploader, files:Array)
uploader:Uploader | Uploader instance sending the event. |
files:Array | Array of file objects that was added to queue/selected by the user. |
public event UploadFile(uploader:Uploader, file:File)
uploader:Uploader | Uploader instance sending the event. |
file:File | File to be uploaded. |
public event UploadProgress(uploader:Uploader, file:File)
uploader:Uploader | Uploader instance sending the event. |
file:File | File that is currently being uploaded. |
Namespace | plupload |
Class | File |
Property | Defined By |
---|---|
id : String
File id this is a globally unique id for the specific file.
| File |
loaded : Number
Number of bytes uploaded of the files total size.
| File |
name : String
File name for example "myfile.
| File |
percent : Number
Number of percentage uploaded of the file.
| File |
size : Number
File size in bytes.
| File |
status : Number
Status constant matching the plupload states QUEUED, UPLOADING, FAILED, DONE.
| File |
Method | Defined By |
---|---|
File(id:String, name:String, size:Number)
Constructs a new file instance.
| File |
public id : String
public loaded : Number
public name : String
public percent : Number
public size : Number
public status : Number
public function File(id:String, name:String, size:Number)
id:String | Unique file id. |
name:String | File name. |
size:Number | File size in bytes. |