Skip to content

Why a-upload support drag to upload by default? Why a-upload supports drag to upload by default? #4144

@bunnyxt

Description

@bunnyxt
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

undefined

Environment

/

Reproduction link

https://antdv.com/components/upload-cn

Steps to reproduce

Try drag a file or image over the a-upload component (not a-upload-dragger), then the file will be uploaded.

拖拽文件或图片到a-upload组件(而不是a-upload-dragger)上,文件也会被上传

What is expected?

The file should not be uploaded.

文件不应该被上传,因为这不是a-upload-dragger;就算默认支持拖拽,那这也没有有好的提示(例如,鼠标移动到上传组件上,上传组件提示用户可以在这里松鼠标,以上传文件)。

What is actually happening?

The dragged over files uploaded.

文件被上传了。


所以这里到底为什么要设计默认支持拖拽上传?倒不是希望不支持,而是这个功能太隐蔽了吧——用户鼠标拖文件的时候完全意识不到这个小上传按钮支持拖拽,是不是可以加一点提示?

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