Skip to content

a-upload component before-upload returns false and does not prevent the insertion of fileList #6135

@primeplayer

Description

@primeplayer

标题:a-upload组件 before-upload 返回false 未阻止fileList的插入;
疑问:有替代方案不允许超出限制的文件 进入filelist吗

步骤1:以官方antdesignvue3版本的实例为例子
https://codesandbox.io/s/yong-hu-tou-xiang-ant-design-vue-3-2-14-forked-b49b2v

步骤2:将show-upload-list置为true 并上传超出2M限制的图片
有如下报错 但fileList中仍有此次超出限制的图片
不应该是不允许此次file进入fileList吗
image

疑问1:
说到替代方案 尝试在获取到错误时 清空fileList也无效
疑问2:
before-upload中不能更改fileList吗
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions