File upload component
- drag and drop / file chooser
- multiple upload (except for IE9)
- add more files during upload
- overall progress bar
- no dependency
Original fileuploader by Frank Freiburger, modified for Laravel by Daniel Ruuth
Same browser support as Vue.js 2
<template>
<div>
<upload url='/upload'></upload>
</div>
</template>
npm install --save danielruuth-vue-file-upload
Target url for the uploaded files (post multipart/form-data).
Allow multiple files to be uploaded simultaneously.
Indicate that you wish to upload images.
Indicates that the capture of media directly from the device's environment using a media capture mechanism is preferred. See capture attribute
Called before a file is about to be uploaded. Return false
to reject the upload, otherwise return true
.
filename
: The filename (without path) of the file.
By default any file is accepted.
Called when a file or a set of files has been uploaded.
status
: HTTP status of the upload or undefined
if no status is available (IE9).
responseText
: reponse of the server.
feedback
: function you can call to give a positive or negative (true
/false
) UI feedback about the upload.
By default, if the property is not defined, a positive feedback is send for HTTP status 2xx and 3xx
Extra data sent with files (name=data).