UploadAttributes

Attribute names of <vaadin-upload>, for use with setAttribute.

Properties

Link copied to clipboard
const val accept: String

Specifies the types of files that the server accepts. Syntax: a comma-separated list of MIME type patterns (wildcards are allowed) or file extensions. Notice that MIME types are widely supported, while file extensions are only implemented in certain browsers, so avoid using it. Example: accept="video/*,image/tiff" or accept=".pdf,audio/mp3"

Link copied to clipboard
const val capture: String

Pass-through to input's capture attribute. Allows user to trigger device inputs such as camera or microphone immediately.

Link copied to clipboard
const val disabled: String

If true, the user cannot interact with this element.

Link copied to clipboard
const val formDataName: String

Specifies the 'name' property at Content-Disposition for multipart uploads. This property is ignored when uploadFormat is 'raw'.

Link copied to clipboard
const val i18n: String

The object used to localize this component. To change the default localization, replace this with an object that provides all properties, or just the individual properties you want to change.

Link copied to clipboard

Specifies the maximum number of files that can be uploaded simultaneously. This helps prevent browser performance degradation and XHR limitations when uploading large numbers of files. Files exceeding this limit will be queued and uploaded as active uploads complete.

Link copied to clipboard
const val maxFiles: String

Limit of files to upload, by default it is unlimited. If the value is set to one, native file browser will prevent selecting multiple files.

Link copied to clipboard
const val maxFileSize: String

Specifies the maximum file size in bytes allowed to upload. Notice that it is a client-side constraint, which will be checked before sending the request. Obviously you need to do the same validation in the server-side and be sure that they are aligned.

Link copied to clipboard

Specifies if the maximum number of files have been uploaded

Link copied to clipboard
const val method: String

HTTP Method used to send the files. Only POST and PUT are allowed.

Link copied to clipboard
const val noAuto: String

Prevents upload(s) from immediately uploading upon adding file(s). When set, you must manually trigger uploads using the uploadFiles method

Link copied to clipboard
const val nodrop: String

Define whether the element supports dropping files on it for uploading. By default it's enabled in desktop and disabled in touch devices because mobile devices do not support drag events in general. Setting it false means that drop is enabled even in touch-devices, and true disables drop in all devices.

Link copied to clipboard
const val target: String

The server URL. The default value is an empty string, which means that window.location will be used.

Link copied to clipboard
const val theme: String

The theme variants to apply to the component.

Link copied to clipboard
const val timeout: String

Max time in milliseconds for the entire upload process, if exceeded the request will be aborted. Zero means that there is no timeout.

Link copied to clipboard
const val uploadFormat: String

Specifies the upload format to use when sending files to the server.

Link copied to clipboard

Set the withCredentials flag on the request.