Dropzone is modifying my image before sending it

蹲街弑〆低调 提交于 2021-01-29 08:39:41

问题


I am facing a problem using Dropzone with an image: Dropzone is sending a file to my server that is different from the original file.

I am using the library from the CDN https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.7.0/dropzone.min.js.

The file I send is https://picciao.com/img/photo-1.jpg The file I receive on my server is https://picciao.com/img/products/k1fDK7MRp40c3TVwPOu4FZOO.jpg

As you can see, the image hasn't the same orientation.

I do not understand where Dropzone is modifying my file.

As the problem seems related to image orientation / EXIF data, I tried to include the exif.js library but that did not solve the issue.

Do you have an idea please?


回答1:


Make sure you're not using the resizeWidth or resizeHeight options. I'm using 5.7.1 and there seems to be a bug with it not correctly resizing portrait images. The orientation get messed up.

https://www.dropzonejs.com/#config-resizeWidth




回答2:


Either use resizeWidth or resizeHeight NOT both options and image will resize with proper aspect ratio.



来源:https://stackoverflow.com/questions/62759821/dropzone-is-modifying-my-image-before-sending-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!