Skip to content

Possibility to remove a selected file #973

Description

@renandegrandi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions