fileuploaderv2
v0.1.2
Published
This is a simple Vue project that provides a drag and drop upload box.<br /> There is some simple frontend validation included such as min/max file sizes and file types
Downloads
3
Readme
This is a simple Vue project that provides a drag and drop upload box. There is some simple frontend validation included such as min/max file sizes and file types
Project structure
In src sub-folder we have VueJS application including
- entry.js
- FileUploaderV2.vue
Setup
npm i fileuploaderv2
In your entry point (where Vue is included, such as app.js/main.js) add the code below
import FileUploaderV2 from 'fileuploaderv2'
Vue.use(FileUploaderV2)
Project requirements
- axios
Props
There is a number of props to use, most importantly you must set the post-url (where the files will go to)
post-url
(string) where the files are sent to (one at a time as FormData, file name is just 'file')min-file-size
(number) size in kilobytes e.g 1000 would be 1MBmin-file-size-message
(string) message to show when the file is under the minimum sizemax-file-size
(number) size in kilobytes e.g. 1000 would be 1MBmax-file-size-message
(string) message to show when the file is larger then the max-file-sizeallowed-file-types
(array) file types that are allowed to be uploaded e.g.['image/jpeg', 'image/png', 'image/jpg']
unknown-file-message
(string) which message to show when the above validation failstitle
(string)
Any problems can be reported to https://github.com/Steveo5/file-uploader-v2