Skip to content

mariojankovic/vue-dead-simple-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue dead simple uploader ☝️

NPM version NPM downloads

Vue DSU

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 environment
  • yarn 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

TODO

  • Add prop to specify icon and label
  • Add drag/drop animation

License

MIT © mariojankovic

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published