new bbbfly.FileUploader (def, ref, parent)
File uploader with build in progress panel,
better single file upload handling
and more error reporting types.
Parameters
| Name | Type | Description |
|---|---|---|
| def | bbbfly.FileUploader.Definition | optional Descendant definition |
| ref | object | optional Reference owner |
| parent | object | string | optional Parent DIV element or its ID |
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| UploadURL | url | ||
| FileUploadID | url | Upload configuration ID | |
| DragAndDrop | boolean | true | If drag&drop is enabled |
| MaxFileSize | integer | Each file maximal size | |
| MaxBatchSize | integer | Maximal size of files batch | |
| MinFilesCount | integer | Minimal count of all files | |
| MaxFilesCount | integer | Maximal count of all files | |
| AllowedExtensions | Array.<string> | Lower case extensions | |
| ErrorLevel | bbbfly.FileUploader.errorlevel | grouped | - Error message precision |
Extends
In Packages
Type Definitions
-
Error object
-
Upload error data
Properties:
Name Type Description Name string File name Error bbbfly.FileUploader.errortype | object Error type or object Type bbbfly.FileUploader.errortype Error type Data mixed Error data -
File object
-
Uploaded file data
Properties:
Name Type Description Id string File id Name string File name
Interfaces
Members
-
static errorlevel enum integer
-
Possible values for bbbfly.FileUploader.ErrorLevel
Name Type Default Description minimal integer 1 grouped integer 2 fulllog integer 3 -
static errortype enum integer
-
Name Type Default Description main integer 1 general integer 2 extension integer 3 size integer 4 count integer 5 batch integer 6
Methods
-
inherited AddChildControl (ctrl)
-
Parameters:
Name Type Description ctrl ngControl optional Child control reference -
CanAddFiles (){boolean}
-
Returns:
Type Description boolean -
CanRemoveFiles (){boolean}
-
Returns:
Type Description boolean -
inherited CreateControl (def){object|null}
-
Parameters:
Name Type Description def ngControl.Definition optional Child control definition Returns:
Type Description object | null Created control -
inherited DisposeControls ()
-
abstract DoShowError (text)
-
Use this method to show error message.
Parameters:
Name Type Description text string Message -
inherited GetAlt (){string|null}
-
- See:
Returns:
Type Description string | null -
inherited GetClassName (suffix){string}
-
Parameters:
Name Type Description suffix string optional Control part class name Returns:
Type Description string Control class name -
inherited GetControlsHolder (){object}
-
Returns:
Type Description object ControlsPanel control or self -
inherited GetControlsPanel (){object|null}
-
Returns:
Type Description object | null ControlsPanel control -
inherited GetFrame (){bbbfly.Renderer.frame}
-
Returns:
Type Description bbbfly.Renderer.frame Frame definition -
inherited GetFrameDims (){object}
-
Returns:
Type Description object Frame dimensions -
inherited GetFramePanel (){object|null}
-
Returns:
Type Description object | null FramePanel control -
GetSelectedFiles (){object|null}
-
Returns:
Type Description object | null - Files with ID as key -
inherited GetState (){bbbfly.Renderer.state}
-
Returns:
Type Description bbbfly.Renderer.state Control state -
GetUploadedFiles (){Array.<bbbfly.FileUploader.File>}
-
Returns:
Type Description Array.<bbbfly.FileUploader.File> - Uploaded files -
HideProgress ()
-
-
IsValid (){boolean}
-
Returns:
Type Description boolean - If number of files is valid -
inherited RemoveChildControl (ctrl)
-
Parameters:
Name Type Description ctrl ngControl optional Child control reference -
Reset ()
-
-
inherited SetAlt (alt, update)
-
Parameters:
Name Type Default Description alt string | null Value to set update boolean true optional If update control - See:
-
inherited SetEnabled (enabled, update){boolean}
-
Parameters:
Name Type Default Description enabled boolean true optional Value to set update boolean true optional If update control Returns:
Type Description boolean False if change was denied -
inherited SetInvalid (invalid, update){boolean}
-
Parameters:
Name Type Default Description invalid boolean true optional Value to set update boolean true optional If update control Returns:
Type Description boolean False if change was denied -
inherited SetOverflow (overflowX, overflowY, update){boolean}
-
Parameters:
Name Type Default Description overflowX bbbfly.Renderer.overflow hidden optional Horizontal value to set overflowY bbbfly.Renderer.overflow hidden optional Vertical value to set update boolean true optional If update control Returns:
Type Description boolean False if change was denied -
inherited SetReadOnly (readonly, update){boolean}
-
Parameters:
Name Type Default Description readonly boolean true optional Value to set update boolean true optional If update control Returns:
Type Description boolean False if change was denied -
inherited SetSelected (selected, update){boolean}
-
Parameters:
Name Type Default Description selected boolean true optional Value to set update boolean true optional If update control Returns:
Type Description boolean False if change was denied -
ShowError (errors)
-
Parameters:
Name Type Description errors bbbfly.FileUploader.Error | Array.<bbbfly.FileUploader.Error> -
ShowProgress (process)
-
Parameters:
Name Type Description process boolean If show ifinite process -
inherited TrackChildControls ()
-
-
inherited TrackControl (ctrl, track)
-
Parameters:
Name Type Default Description ctrl ngControl optional Tracked control reference track boolean true optional Pass false to cancel tracking -
UpdateProgress (progress)
-
Parameters:
Name Type Default Description progress number 0 optional Percentual progress -
UploadFiles ()
-
Events
-
inherited IsTrackedControlChanged (ctrl, options)
-
Parameters:
Name Type Description ctrl ngControl optional Tracked control reference options object optional Per tracker options -
inherited OnAltChanged ()
-
inherited OnChildControlAdded (ctrl)
-
Parameters:
Name Type Description ctrl ngControl optional Child control reference -
inherited OnChildControlRemoved (ctrl)
-
Parameters:
Name Type Description ctrl ngControl optional Child control reference -
inherited OnEnabledChanged ()
-
- See:
-
OnFilesChanged ()
-
-
OnGetRequestParams (params)
-
Parameters:
Name Type Description params object -
inherited OnInvalidChanged ()
-
- See:
-
inherited OnOverflowChanged ()
-
inherited OnReadOnlyChanged ()
-
inherited OnSelectedChanged ()
-
inherited OnSetAlt (alt, update){boolean}
-
Parameters:
Name Type Default Description alt boolean Value to set update boolean true optional If update control - See:
Returns:
Type Description boolean Return false to deny value change -
inherited OnSetEnabled (enabled){boolean}
-
Parameters:
Name Type Description enabled boolean Value to set Returns:
Type Description boolean Return false to deny value change -
inherited OnSetInvalid (invalid){boolean}
-
Parameters:
Name Type Description invalid boolean Value to set Returns:
Type Description boolean Return false to deny value change -
inherited OnSetOverflow (overflowX, overflowY){boolean}
-
Parameters:
Name Type Description overflowX bbbfly.Renderer.overflow optional Horizontal value to set overflowY bbbfly.Renderer.overflow optional Vertical value to set Returns:
Type Description boolean Return false to deny values change -
inherited OnSetReadOnly (readonly){boolean}
-
Parameters:
Name Type Description readonly boolean Value to set Returns:
Type Description boolean Return false to deny value change -
inherited OnSetSelected (selected){boolean}
-
Parameters:
Name Type Description selected boolean Value to set Returns:
Type Description boolean Return false to deny value change -
inherited OnTrackedControlChanged (ctrl)
-
Parameters:
Name Type Description ctrl ngControl optional Tracked control reference