Dropzone在发送之前修改了我的图像 [英] Dropzone is modifying my image before sending it

查看:31
本文介绍了Dropzone在发送之前修改了我的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用带图像的Dropzone时遇到问题:Dropzone正在向我的服务器发送与原始文件不同的文件.

我正在使用CDN中的库 https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.7.0/dropzone.min.js .

我发送的文件是 https://picciao.com/img/photo-1.jpg 我在服务器上收到的文件是 https://picciao.com/img/products/k1fDK7MRp40c3TVwPOu4FZOO.jpg

如您所见,图像的方向不同.

我不知道Dropzone在哪里修改我的文件.

由于问题似乎与图像方向/EXIF数据有关,因此我尝试包括exif.js库,但未能解决问题.

请问您有个主意吗?

解决方案

请确保您未使用 resizeWidth resizeHeight 选项.我正在使用5.7.1,似乎有一个错误,无法正确调整纵向图像的大小.方向搞砸了.

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

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?

解决方案

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

这篇关于Dropzone在发送之前修改了我的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆