nanxiaobei / antd-img-crop

🗡 An image cropper for Ant Design Upload
MIT License
497 stars 156 forks source link

Error using imgCrop on oss upload #143

Closed Sunnyjson closed 3 years ago

Sunnyjson commented 3 years ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. using imgCrop
  2. data callback => file not has url

What is expected?

has url

What is actually happening?

not has url

Environment Info
antd 4.15.1
React 17.x
System mac
Browser chrome
Sunnyjson commented 3 years ago

把antd 降到4.6.1, antd-img-crop 降到3.9.0 解决了这个问题, 应该是在之后的版本出现了这个bug, 希望能得到解决

Sunnyjson commented 3 years ago

目前通过降版本来解决了这个问题, 在ant-design 提了issues https://github.com/ant-design/ant-design/issues/30988 ,未能得到解决

nanxiaobei commented 3 years ago

之前 antd Upload 的 data 属性不支持函数形式,函数形式应该是后来加的,所以不兼容。

建议直接给 data 赋值,不使用函数属性。

Sunnyjson commented 3 years ago

直接给data赋值, upload上传是失败的 这不是一个解决方法 @nanxiaobei