ElemeFE / ElemeFE/element-react
Upload: drop zone didn't handle any accept config
Open
- Dominant language
- JavaScript
- Stars
- 2.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
### Description
The `accept` config can't work with drag and drop upload.
### Reproduce Steps
1. Set `accept="image/*"` to the component;
2. Set `drag` as true;
3. Drop a PDF file into the zone;
4. The PDF file uploaded.
### Solution
Should do some check when drop event happened. Even more consideration like hint when `dragenter` event for better user experience.
And the temporary workaround is to check the type by developer self in `beforeUpload` handler.
Contributor guide
Assessment
This issue has not been assessed yet.