Vue Upload Options Core




The set of core options.

url

@default null

Specify the endpoint url to upload to.

name

@default 'file'

Specify the instance name.

accept

@default null

Specify the accepted file / mime types for file select.

For example 'audio/*', 'image/*', etc.

body

@default {}

Add any additional body parameters to the upload post request.

dropzoneId

@default null

Set an element id to use as a drop area for the dropzone.

onSelect

@default null

The callback event when files are selected.

onStart

@default null

The callback event when file upload process begins.

onEnd

@default null

The callback event when files upload process is complete.

onQueue

@default null

The callback for each individual file when added to the queue.

onProgress

@default null

The callback for each individual file when upload starts.

onUpload

@default null

The callback for each individual file when upload sends all it's data.

onSuccess

@default null

The callback for each individual file when upload is successfully complete.

onError

@default null

The callback for each individual file when upload responds with an error.

onComplete

@default null

The callback for each individual file when full upload life cycle completes with either a success or an error response.

startOnSelect

@default true

Set whether upload should start automatically or not once files are selected.

extensions

@default ['jpeg', 'jpg', 'png', 'gif']

Set the accepted file extensions allowed for upload to check on the front end before uploading.

maxSizePerFile

@default 1024 * 1024 * 2

Set the maximum allowed file size for upload to check on the front end before uploading.

multiple

@default false

Select file upload mode to allow multiple uploads or not.

maxFilesSelect

@default 4

When multiple is set to true set the maximum number of files that can be selected at a time.

maxFilesInProgress

@default 2

When multiple is set to true set the maximum number of files that can be uploaded at a time.

maxFilesSelectMsg

@default 'Max of {max} files can be selected at a time.'

Set the front end error message for max files selected.

maxFileSizeMsg

@default 'Max of {max} mb per file.'

Set the front end error message for max file size.

invalidExtensionMsg

@default 'File must be one of {extensions}.'

Set the front end error message for invalid file extension.

parseErrors

@default __parseErrors

Default error parsing function to use when receiving a file upload error response.

http

@default __http

Default http function to use when making upload post request.

A set of drivers including vue-resource and axios is available out of the box.