-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
This function solves the problem (这个功能解决的问题)
The upload component that already exists is useful, but it does not fit all use cases that users might have. I often come across cases where I need to manipulate directly the blob of the selected file, and handle its upload by myself later when I'm done doing what I need to do with the file locally.
On the other hand, the upload component is pretty well done, and cover a lot of use cases with all the options available UI-wise.
On the component side, you can set it to type "file", but it's the obvious the Input component has not been designed with this use case in mind (You can check out here how the input component handles file type : https://codesandbox.io/s/suspicious-wind-pfnlw).
Expected API (期望的 API)
From what I've seen, I see two possibilities :
-
The first one would be to modify the current Upload component to implement this whole behaviour as an option, but It does not really make sense, as we're getting away from the original puropose of the component which is handling file upload
-
The second option would be extract the UI of the Upload component as a standalone FileInput component
Let me know what you think about this, or if I can help in any way.