ElemeFE / ElemeFE/element-react

Upload: drop zone didn't handle any accept config

Open
#703 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.