Super vue-dropzone file upload component

 

installation

npm install vue2-dropzone

 

how to use

<vue-dropzone ref="myVueDropzone" id="dropzone" :options="dropzoneOptions"></vue-dropzone>
import vue2Dropzone from 'vue2-dropzone'
import 'vue2-dropzone/dist/vue2Dropzone.min.css'
export default {
  name: 'app',
  components: {
    vueDropzone: vue2Dropzone
  },
  data: function () {
    return {
      dropzoneOptions: {
          url: 'https://httpbin.org/post',
          thumbnailWidth: 150,
          maxFilesize: 0.5,
          headers: { "My-Awesome-Header": "header value" }
      }
    }
  }
}

 

Demo Institute Add

Basic Presentation https://rowanwins.github.io/vue-dropzone/docs/dist/index.html#/demo

 

Guess you like

Origin www.cnblogs.com/tangwei89/p/11611283.html