0.0.5 • Published 6 years ago
vue-dsu v0.0.5
Vue dead simple uploader ☝️
A simple vue upload component with HTML only drag and drop features. It has image preview functionality and uses axios to push your image to whatever endpoint you specify.
Install
yarn add vue-dsu
# or
npm install vue-dsu --save
CDN: UNPKG | jsDelivr (available as window.VueSimpleUploader
)
Installation
import Uploader from 'vue-dsu'
Vue.use(Uploader)
Props
required: { // Field is not mandatory by default
default: false
},
apiURL: {}, // http://your-api-url.com/
accept: {
default: 'image/*'
},
preview: { // Show image preview by default
default: true
}
Usage
<template>
<uploader v-model="thumbnail_url" :required="true" apiURL="http://yourapiurl.com" accept="" />
</template>
<script>
data () {
return {
thumbnail_url: 'https://picsum.photos/300/300'
}
}
</script>
ContriBOOT 👢
yarn dev
: Run the dev environmentyarn build
: Build for npm
Getting started
# Fork the repo
git clone git@github.com:$YOUR_NAME/vue-dead-simple-uploader.git && cd vue-dead-simple-uploader
yarn dev
yarn build
License
MIT © mariojankovic