@serenity-is/corelib / UploaderOptions
optional
accept:string
Accept. If not specified, read from the passed input
optional
allStart: () =>void
Progress event that is called before first batch start is about to be uploaded
void
optional
allStop: () =>void
Progress event that is called after last batch is ended uploading or failed
void
optional
autoClear:boolean
Auto clear input value after selection, so when same file selected it works. Default is true
optional
batchHandler: (batch
,uploader
) =>void
|Promise
<void
>
Callback to handle a batch. If not specified, a default handler is used.
void
| Promise
<void
>
optional
batchProgress: (data
) =>void
Progress event that is called during upload
number
number
void
optional
batchSize:number
Only used for multiple, default is 1 to upload multiple files in batches of size 1
optional
batchStart: (data
) =>void
Progress event that is called when a batch is about to be uploaded
void
optional
batchStop: (data
) =>void
Progress event that is called when a batch is ended uploading or failed
void
optional
batchSuccess: (data
) =>void
Called after batch is uploaded successfully
void
optional
changeCallback: (e
) =>void
Only called when a change/drop event occurs, but files can't be determined
Event
void
optional
dropZone:HTMLElement
|ArrayLike
<HTMLElement
>
An optional list of dropzones.
optional
errorHandler: (data
) =>void
Error handler, if not specified Uploader.errorHandler is used
void
optional
ignoreType:boolean
Ignore file types, e.g. don't check accept property of input or this options
optional
input:HTMLInputElement
Target input. If null, dropZone should be specified.
optional
multiple:boolean
Allow multiple files. If not specified is read from the input
optional
name:string
The field name to use in FormData object. Default is files[]