nanxiaobei / antd-img-crop

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

customRequest is skipped when beforeCrop returns falsy #190

Closed WenhanDo closed 2 years ago

WenhanDo commented 2 years ago

I have a situation where only certain kind of images need cop and for others, cop is skipped by returning false in beforeCrop but customRequest is skipped when beforeCrop returns false or a Promise that resolves false

is this a feature or a bug?

WenhanDo commented 2 years ago

also, seems like beforeUpload is skipped too

nanxiaobei commented 2 years ago

when beforeCrop returns falsy, will stop the upload work.

komarovalexander commented 11 months ago

@WenhanDo instead of false, return the passed file and it will work

    beforeCrop={(file) => file}