ObservableUploader
Package: | Ext.ux.upload |
Defined In: | Ext.ux.upload.Uploader.js |
Class: | Uploader |
Extends: | Observable |
Author: | Gary van Woerkens |
Version: | 1.0 |
var uploader = new Ext.ux.upload.Uploader({
url:"/var/www/my/upload/folder/"
});
var button = new Ext.Button({
text:"swfupload trigger"
,plugins:[uploader]
});
button.render(Ext.getBody());
var panel = new Ext.Panel({
title:"upload drop zone"
,width:300
,height:200
,plugins:[uploader]
});
panel.render(Ext.getBody());
Config Options | Defined By | |
---|---|---|
allowedFileTypes : String all types of file that can be uploaded
(e.g., "*.png;*.jpg;*.gif").
To allow all types of file to be uploaded use "*.... all types of file that can be uploaded
(e.g., "*.png;*.jpg;*.gif"). To allow all types of file to be uploaded use "*.*". | Uploader | |
debug : Boolean Enable debug (SWFupload) | Uploader | |
enableLogPanel : Boolean True to display upload logs panel. | Uploader | |
html5Params : Object To specify a specific config Html5 upload. | Uploader | |
maxFileSize : Number Maximum size of a file to upload. | Uploader | |
maxFiles : Number Maximum number of files to upload in a row. | Uploader | |
swfParams : Object To specify a specific config for SWFUpload. | Uploader | |
swfUrl : String The URL form which to request swfupload object. | Uploader | |
url : String The URL where files will be uploaded. Starts from www document root. | Uploader | |
: path | Uploader | |
listeners : Object A config object containing one or more event handlers to be added to this
object during initialization. This should ... A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from ExtJs Components While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this
is usually only done when extra value can be added. For example the DataView's
| Observable |
Property | Defined By | |
---|---|---|
connections : Array An array of opened connections. | Uploader | |
queue : Array An array of files. | Uploader |
Method | Defined By | |
---|---|---|
Uploader( Object config )
:
voidCreate a new Uploader Create a new Uploader Parameters:
| Uploader | |
addEvents( Object|String o , string Optional. )
:
voidAdds the specified events to the list of events which this Observable may fire. Adds the specified events to the list of events which this Observable may fire. Parameters:
| Observable | |
addListener( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object. Appends an event handler to this object. Parameters:
| Observable | |
enableBubble( String/Array events )
:
voidEnables events fired by this Observable to bubble up an owner hierarchy by calling
this.getBubbleTarget() if present.... Enables events fired by this Observable to bubble up an owner hierarchy by calling
This is commonly used by Ext.Components to bubble events to owner Containers. See Ext.Component.getBubbleTarget. The default implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to access the required target more quickly. Example:
Parameters:
| Observable | |
fireEvent( String eventName , Object... args )
:
BooleanFires the specified event with the passed parameters (minus the event name).
An event may be set to bubble up an Obse... Fires the specified event with the passed parameters (minus the event name). An event may be set to bubble up an Observable parent hierarchy (See Ext.Component.getBubbleTarget) by calling enableBubble. Parameters:
| Observable | |
getLogPanel()
:
Object Returns the panel to log upload events. Returns the panel to log upload events. Parameters:
| Uploader | |
hasListener( String eventName )
:
BooleanChecks to see if this object has any listeners for a specified event Checks to see if this object has any listeners for a specified event Parameters:
| Observable | |
on( String eventName , Function handler , [Object scope ], [Object options ] )
:
voidAppends an event handler to this object (shorthand for addListener.) Appends an event handler to this object (shorthand for addListener.) Parameters:
| Observable | |
purgeListeners()
:
void Removes all listeners for this object Removes all listeners for this object Parameters:
| Observable | |
relayEvents( Object o , Array events )
:
voidRelays selected events from the specified Observable as if the events were fired by this. Relays selected events from the specified Observable as if the events were fired by this. Parameters:
| Observable | |
removeListener( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler. Removes an event handler. Parameters:
| Observable | |
resizeTrigger()
:
void Handles the trigger resize event to place the swfupload button over it.
Scope is on trigger component. Handles the trigger resize event to place the swfupload button over it. Scope is on trigger component. Parameters:
| Uploader | |
resumeEvents()
:
void Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
event... Resume firing events. (see suspendEvents)
If events were suspended using the queueSuspended parameter, then all
events fired during event suspension will be sent to any listeners now. Parameters:
| Observable | |
setDropZone( Ext.Component cmp )
:
voidInitializes an upload drop zone for a component
The component has to be in the dropzone list (dataview). Initializes an upload drop zone for a component The component has to be in the dropzone list (dataview). Parameters:
| Uploader | |
setLogFrame()
:
void Parameters:
| Uploader | |
setPath( String url )
:
voidSet the url where files have to be uploaded Set the url where files have to be uploaded Parameters:
| Uploader | |
setTrigger( Ext.Component cmp )
:
voidInitializes a swfupload button over a component.
The component has to be in the trigger list (button, menu item). Initializes a swfupload button over a component. The component has to be in the trigger list (button, menu item). Parameters:
| Uploader | |
setUploadUrl( String url )
:
voidSet the url where files have to be uploaded Set the url where files have to be uploaded Parameters:
| Uploader | |
suspendEvents( Boolean queueSuspended )
:
voidSuspend the firing of all events. (see resumeEvents) Suspend the firing of all events. (see resumeEvents) Parameters:
| Observable | |
un( String eventName , Function handler , [Object scope ] )
:
voidRemoves an event handler (shorthand for removeListener.) Removes an event handler (shorthand for removeListener.) Parameters:
| Observable |
Event | Defined By | |
---|---|---|
beforeupload :
( Ext.ux.upload.SwfConnector this , Number selectedFilesCount )
Fires just before files upload. Return false to cancel upload. Fires just before files upload. Return false to cancel upload. Listeners will be called with the following arguments:
| Uploader | |
queuecomplete :
( Ext.ux.upload.Uploader this , Object conn , Object file )
Listeners will be called with the following arguments:
| Uploader | |
uploadcomplete :
( Ext.ux.upload.Uploader this , Object conn , Object file )
Fires when a file has been uploaded. Fires when a file has been uploaded. Listeners will be called with the following arguments:
| Uploader | |
uploadstart :
( Ext.ux.upload.Uploader this , Object conn , Object file )
Listeners will be called with the following arguments:
| Uploader |