You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Upload.Dragger can't trigger beforeUpload when accept is not empty #36318
Activity
Sanford284 commentedon Jun 30, 2022
same issue not solved at 2019. #17090
afc163 commentedon Jun 30, 2022
#30403
Sanford284 commentedon Jun 30, 2022
#30403 (comment)
我是 windows系统,可以选择非 accept 文件,此时 beforeUpload 还是没有触发的。
https://github.com/react-component/upload/pull/329/files 看起来没有解决这个问题
OliverLeighC commentedon Apr 27, 2023
any update on this?
auki-zy commentedon Jun 16, 2023
@afc163 目前添加 accept 属性,Dragger 拖入非 accept 的文件没有走到 beforeUpload,有什么方案可以处理下
dqrjz commentedon May 8, 2024
+1 当用户拖入非 accept 的文件,目前是没有任何反应的。我想要弹出message(例如”该类型文件不支持“),好像没法实现。只有onDrop会触发,但onDrop里只有DragEvent,没有file的信息。
chenxiaoleizi commentedon Aug 14, 2024
可以在
DragEvent中拿到 fileafc163 commentedon Jun 27, 2025
Fixed in 5.x now, see https://codesandbox.io/p/sandbox/antd-reproduction-template-forked-ydljps?file=%2Findex.js%3A11%2C38