-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Is your feature request related to a problem? Please describe.
目前组件通过判断文件后缀名 + accept 属性来限制用户上传。但后缀名是可以随意更改的。
Describe the solution you'd like
是否可以通过 File Api,来获取文件真正的类型来限制上传呢?
Describe alternatives you've considered
不过组件使用者只会传 accept 进来。组件内部能帮应用层面匹配的限制估计是有限的。比如 accept = image/*,那么文件类型是图片的就放行。肯定不是每一种 accept 都有较好对应的 File 类型。
Additional context
复杂的场景,其实是需要组件使用者通过 beforeUpload 钩子自行去做拦截判断的。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels