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

Implement UI for deleting hosted image attachments #4630

Open
jrobbins opened this issue Dec 10, 2024 · 1 comment
Open

Implement UI for deleting hosted image attachments #4630

jrobbins opened this issue Dec 10, 2024 · 1 comment
Assignees

Comments

@jrobbins
Copy link
Collaborator

When a feature entry is edited to remove the only link to an attachment, that attachment should be marked deleted in datastore.

I think this requires two steps:

  1. On the server, when a POST is made to update a field of type attachments, it should compare the old value to the new value and delete any attachments that are no longer linked.
  2. In the UI, the user could simply delete the line of text that has that URL. We could also offer an X icon on the thumbnails.
  3. In the UI, we should probably have some kind of confirmation step because users might accidentally delete an attachment.

Once the attachment is marked deleted, requests for that attachment will give a 404. There is already logic for that in get_attachment() in attachments.py.

@jrobbins jrobbins self-assigned this Dec 10, 2024
@Akashbayzid
Copy link

__

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

No branches or pull requests

2 participants