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

Event "vdropzone-error" does not seem to fire with AWS #506

Open g-traub opened 5 years ago

g-traub commented 5 years ago

Hi, I'm using v-dropzone in a project and for error handling I need to use "vdropzone-error" event, but it doesn't fire. I tried replicating the problem : https://codesandbox.io/s/vdropzone-error-event-not-firing-lrx66?fontsize=14

  <div id="app">
    <img width="25%" src="./assets/logo.png">
    <Dropzone
      id="dropzone"
      :options="dropzoneOptions"
      :awss3="awss3"
      @vdropzone-s3-upload-error="error"
      @vdropzone-error="error"
    />
  </div>
</template>

<script>
import Dropzone from "vue2-dropzone";
import "vue2-dropzone/dist/vue2Dropzone.min.css";

export default {
  name: "App",
  components: {
    Dropzone
  },
  data() {
    return {
      dropzoneOptions: {
        paramName: "file",
        maxFilesize: 2
      },
      awss3: {
        // the bad url is what triggers the error
        signingURL: `url`,
        params: {},
        withCredentials: false,
        sendFileToServer: false
      }
    };
  },
  methods: {
    error() {
      console.log("error");
    }
  }
};
</script>

I get an error in the console : Capture d’écran de 2019-11-06 16-07-18 But it doesn't fire the event

rowanwins commented 4 years ago

The current implementation of S3 support doesn't make best use of the dropzone events so I'm currently reworking it, hopefully we'll have some progress in #549

buiminhtri318 commented 4 years ago

Thanks for you hard working guys. What is current status of this issue? I am using 3.6.0 and facing same problem.