rowanwins / vue-dropzone

A Vue.js component for Dropzone.js - a drag’n’drop file uploads utility with image previews
https://rowanwins.github.io/vue-dropzone/docs/dist
MIT License
2.02k stars 1.4k forks source link

Can not pass $axios to options for xhr call which is missing updated token #603

Open mahmed0715 opened 3 years ago

mahmed0715 commented 3 years ago

Hi, Thanks for this module, this is a great module, I was wondering there is way to pass our custom $axios instance to options so that whatever we updated in our $axios can be used and we have a break free system.. Thanks

ajingopi-bridge commented 3 years ago

@mahmed0715 Yes you could use autoProcessQueue: false, in options and custom upload using $axios from file-added event. See the below example.

async sendFile(file) {
      const data = new FormData()
      data.append('file', file)

      const imageApi = 'api-end-point'

      await this.$axios.$put(imageApi, data)