I\'m trying to implement Dropzone on my site. I want to listen for the \"success\" event and then take the server response and add some info from it to a form on the same pa
Note that there is an issue with chunked uploads and never get back the response from the server on success. All the previous answers will not work in that case. Solution could be by manually parsing XHR response like so:
const galleryZone = new Dropzone(".dropzone-gallery", {
url: your_upload_url_in_here,
chunking: true,
forceChunking: true,
chunkSize: 2000000,
success: (file, response) => {
console.log(JSON.parse(file.xhr.response));
}
});
Alse you could check the issue at Dropzone's repository in here https://gitlab.com/meno/dropzone/issues/51#note_47553173