Skip to content
New issue

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

Possibility to remove a selected file #973

Open
renandegrandi opened this issue Nov 7, 2023 · 0 comments
Open

Possibility to remove a selected file #973

renandegrandi opened this issue Nov 7, 2023 · 0 comments

Comments

@renandegrandi
Copy link

Is your feature request related to a problem? Please describe.
I am using the uploader with the image preview option, however I only upload the file to the server when the user performs a confirmation action, that is, I keep the file in the browser until the user confirms that they want to upload it .
However, it may happen that the user wants to remove the image, and I was unable to find any option in the component to remove the selection.
What I did was manually manipulate the preview element by removing the generated image, however, if I analyze the upploader instance the file is still there, I tried using the function (Upload(new Blob())) but it generates a broken image.

Describe the solution you'd like
I wondered if we could have a public function clearselectedfile, where we would remove the file from the file upload component and run the private bind function to update the preview

Describe alternatives you've considered
For my case, I am manipulating the preview element myself, removing the src

Additional context
no any

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant