We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 钩子自行去做拦截判断的。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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 钩子自行去做拦截判断的。
The text was updated successfully, but these errors were encountered: