Skip to content

Confirmation before removing uploaded Attachments #2010

Open
@ajaxray

Description

@ajaxray

Is your feature request related to a problem? Please describe.

The upload field shows a preview of uploaded files. Also shows an (x) button to remove individual files!
Also the similar preview thumbs are displayed for already uploaded Attachments.
CleanShot 2021-12-19 at 04 21 52@2x

Now the problem is, if I click on the delete icon (x) of a thumb, it removes immediately.
If we could display a confirmation before deleting an uploaded image, that would be great!

Describe the solution you'd like
After clicking on the (x) icons, the system will ask for confirmation like "Are you sure to delete this file?"
Also the message can be configurable, like:

Upload::make('upload')
    ->maxFileSize(1024)
    ->deleteConfirmation("Are you sure to delete this product image?")
;

Describe alternatives you've considered
I'm stuck at this point 😓. Tried invoking dropzone confirmation by setting dictRemoveFileConfirmation, but it didn't work.

Metadata

Metadata

Assignees

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