UploaderModel

Interface representing the Uploader class.

Properties

allowedExtensions String

Specifies a comma separated list of extensions that can be uploaded, for example ".webp,.png".

Default: ""

asyncSettings AsyncSettingsModel

Specifies the save and remove URL to perform the upload operations in the server asynchronously.

Default: { saveUrl: "", removeUrl: "" }

autoUpload Boolean

Specifies whether to auto upload the files once they are added to the upload queue. If files need to be manipulated before upload, then this should be false.

Default: true

buttons ButtonSettingsModel

Specifies the text values or localization values for the buttons that appear in the uploader. The buttons “upload” and “clear” will not be visible in the file list when autoUpload property is true.

Default: { browse : 'Browse...', clear: 'Clear', upload: 'Upload' }

cssClass String

Specifies CSS classes to customize the appearance of the control.

Default: ""

directoryUpload Boolean

Specifies whether the folder of files can be browsed in the uploader control.

Default: false

dropArea String HTMLElement

Specifies the drop area target to handle the drag-and-dropping of a file into the uploader.

Default: null

dropEffect DropEffect

Specifies the drag operation effect used for the uploader control.

Default: Default

enabled Boolean

Specifies whether the control is enabled or disabled, disabled will prevent user interaction.

Default: true

enableHtmlSanitizer Boolean

Specifies whether to allow the rendering of untrusted HTML and JavaScript values withing the control. When true, any untrusted strings or scripts will be remote before rendering.

Default: true

enableRtl Boolean

Specifies whether to render the control in right to left direction.

Default: false

enableState Boolean

Specifies whether to persist the state of the control between page loads.

The following properties will be saved to state.
  • filesData

Default: false

files FilesModel[]

Specifies a list of files that will be preloaded on the rendering of uploader control.

Default: []

htmlAttributes {:}

Specifies additional HTML attributes, such as title, styles, class, id, and name, in a key-value pair format that will be appended to the HTML element. If both the property and equivalent HTML attributes are configured, then the control overrides the property value with the HTML attributes.

Default: {}

locale String

Specifies the culture and localization value for this control, overriding the globally defined value.

Default: en-US

maxFileSize Number

Specifies the maximum allowed file size in bytes that will be allowed to be uploaded.

Default: 30000000

minFileSize Number

Specifies the minimum allowed file size in bytes that will be allowed to be uploaded.

Default: 0

multiple Boolean

Specifies whether multiple files can be browsed or dropped simultaneously in the uploader control.

Default: true

sequentialUpload Boolean

Specifies whether to process multiple files simultaneously or upload files one after the other.

Default: false

showFileList Boolean

Specifies whether the file list should be rendered.

Default: true

template String Function

Specifies a template used to customize the appearance of the uploader.

Default: null

Events

actionComplete EmitType<ChunkSuccessEventArgs>

Event callback that is raised after files have been upload successfully or failed to server.

beforeRemove EmitType<ChunkSuccessEventArgs>

Event callback that is raised before the removing process starts allowing for additional parameter to be added to the HTTP request.

beforeUpload EmitType<BeforeUploadEventArgs>

Event callback that is raised before the upload process starts allowing for additional parameter to be added to the HTTP request.

canceling EmitType<ChunkSuccessEventArgs>

Event callback that is raised when canceling a file upload.

change EmitType<Object>

Event callback that is raised when changes have occurred in the uploaded file list by selecting or dropping files.

chunkFailure EmitType<ChunkSuccessEventArgs>

Event callback that is raised when a chunk file upload fails.

chunkSuccess EmitType<ChunkSuccessEventArgs>

Event callback that is raised when a chunk file upload is successful.

chunkUploading EmitType<UploadingEventArgs>

Event callback that is raised when every chunk upload is started allowing for additional parameter to the added to the HTTP request.

clearing EmitType<ClearingEventArgs>

Event callback that is raised before the clearing of the files from the file list when the clear button is clicked.

created EmitType<CreatedEventArgs>

Event callback that is raised when the control has been created.

destroyed EmitType<Object>

Event callback that is raised when the control has been destroyed.

failure EmitType<FailureEventArgs>

Event callback that is raised when an AJAX request fails on uploading or removing files.

pausing EmitType<PauseResumeEventArgs>

Event callback that is raised when pausing a chunk file upload.

progress EmitType<ProgressEventArgs>

Event callback that is raised when uploading a file to the server using an AJAX request.

removing EmitType<RemovingEventArgs>

Event callback that is raised before the removing of a file is started.

rendering EmitType<RenderingEventArgs>

Event callback that is raised before the rendering of each file item in the file list.

resuming EmitType<PauseResumeEventArgs>

Event callback that is raised when resuming a paused chunk file upload.

selected EmitType<SelectedEventArgs>

Event callback that is raised when selecting or dropping files to the upload queue.

success EmitType<SuccessEventArgs>

Event callback that is raised when the AJAX request gets a success on uploading files or removing files.

uploading EmitType<UploadingEventArgs>

Event callback that is raised when uploading has begun allowing for additional parameter to the added to the HTTP request.