vue-s3-dropzone
vue-s3-dropzone copied to clipboard
resizeWidth, resizeHeight work?
Is the dropzone options all working? resizeWidth, resizeHeight don't seem to work for me.
For me it's also not working. My guess is that it's because of the overwritten sending method. Any ideas?
Hi! I just add the same issue but I'm not using this module (use mine based on vue2-dropzone and this one).
@berndartmueller, you're right. It's because of hijacking the xhr.send to upload directly the file instead of the formData due to AWS restrictions.
See here:
https://github.com/kfei/vue-s3-dropzone/blob/master/frontend/src/components/Dropzone.vue#L35
The fact is the file object is not the resized image File but the original one.
I finally managed to get the resized image by looking into the given formData object when .send get called.
@kfei, I suggest you to change your function into this:
sending(file, xhr) {
const _send = xhr.send
xhr.send = formData => _send.call(xhr, formData.get('file'))
}