Search results

UploaderModel

Interface for a class Uploader

Properties

canceling

EmitType<Object>

Fires if cancel the chunk file uploading.

change

EmitType<Object>

Triggers when changes occur in uploaded file list by selecting or dropping files.

chunkFailure

EmitType<Object>

Fires if the chunk file failed to upload.

chunkSuccess

EmitType<Object>

Fires when the chunk file uploaded successfully.

clearing

EmitType<ClearingEventArgs>

Triggers before clearing the items in file list when clicking “clear”.

created

EmitType<Object>

Triggers when the component is created.

failure

EmitType<Object>

Triggers when the AJAX request fails on uploading or removing files.

pausing

EmitType<Object>

Fires if pause the chunk file uploading.

progress

EmitType<Object>

Triggers when uploading a file to the server using the AJAX request.

removing

EmitType<RemovingEventArgs>

Triggers on removing the uploaded file. The event used to get confirm before removing the file from server.

resuming

EmitType<Object>

Fires if resume the paused chunk file upload.

selected

EmitType<SelectedEventArgs>

Triggers after selecting or dropping the files by adding the files in upload queue.

success

EmitType<Object>

Triggers when the AJAX request gets success on uploading files or removing files.

uploading

EmitType<Object>

Triggers when the upload process gets started. This event is used to add additional parameter with upload request.

allowedExtensions

string

Specifies the extensions of the file types allowed in the uploader component and pass the extensions with comma separators. For example, if you want to upload specific image files, pass allowedExtensions as “.jpg,.png”.

asyncSettings

AsyncSettingsModel

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

autoUpload

boolean

By default, the uploader component initiates automatic upload when the files are added in upload queue. If you want to manipulate the files before uploading to server, disable the autoUpload property. The buttons “upload” and “clear” will be hided from file list when autoUpload property is true.

buttons

ButtonsPropsModel

You can customize the default text of “browse, clear, and upload” buttons with plain text or HTML elements. The buttons’ text can be customized from localization also. If you configured both locale and buttons property, the uploader component considers the buttons property value.

directoryUpload

boolean

Specifies a Boolean value that indicates whether the folder of files can be browsed in the uploader component.

When enabled this property, it allows only files of folder to select or drop to upload and it cannot be allowed to select or drop files.

dropArea

string | HTMLElement

Specifies the drop target to handle the drag-and-drop upload. By default, the component creates wrapper around file input that will act as drop target.

For more information, refer to the drag-and-drop section from the documentation.

enablePersistence

boolean

Enable or disable persisting component’s state between page reloads.

enableRtl

boolean

When this property is enabled, the uploader component elements are aligned from right-to-left direction to support locales.

enabled

boolean

Specifies Boolean value that indicates whether the component is enabled or disabled. The uploader component does not allow to interact when this property is disabled.

files

FilesPropModel[]

Specifies the list of files that will be preloaded on rendering of uploader component. The property used to view and remove the uploaded files from server. By default, the files are configured with uploaded successfully state. The following properties are mandatory to configure the preload files:

  • Name
  • Size
  • Type {% codeBlock src=“uploader/files-api/index.ts” %}{% endcodeBlock %}

{% codeBlock src=“uploader/files-api/index.html” %}{% endcodeBlock %}

locale

string

Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

maxFileSize

number

Specifies the maximum allowed file size to be uploaded in bytes. The property used to make sure that you cannot upload too large files.

minFileSize

number

Specifies the minimum file size to be uploaded in bytes. The property used to make sure that you cannot upload empty files and small files.

multiple

boolean

Specifies a Boolean value that indicates whether the multiple files can be browsed or dropped simultaneously in the uploader component.

showFileList

boolean

Specifies a Boolean value that indicates whether the default file list can be rendered. The property used to prevent default file list and design own template for file list.

template

string

Specifies the HTML string that used to customize the content of each file in the list.

For more information, refer to the template section from the documentation.