Closed adnanmuttaleb closed 4 years ago
The response
parameter for the success
handler is empty, that is why I am getting the parsing error.
I solved it by using the vdropzone-success
instead of vdropzone-s3-upload-success
:
<vue2Dropzone
v-on:vdropzone-success="s3UploadSuccess"
...>
</vue2Dropzone>
My handler:
s3UploadSuccess(file) {
let s3ObjectLocation = new URL(file.s3Signature.key, file.s3Url).href;
//do what ever you want
}
@adnanmuttaleb how did you get chunking to work correctly? https://github.com/rowanwins/vue-dropzone/issues/544 suggests that chunking is not supported, which matches my experience. The upload completes but the resulting file in S3 is only a fraction of the original file size (where that fraction appears to be the original size divided by the chunk size).
I added
chunking: true
to dropzone options, and s3 is uploading chunk correctly but when finish, I get the following message in console:TypeError: (new window.DOMParser(...)).parseFromString(...).firstChild.children is undefined
Although It works for small file sizes, in other words the
vdropzone-s3-upload-success
handler fire for small files, but for large files it will not fire?