theriex / rh

PastKey.org source and issues
https://pastkey.org
1 stars 0 forks source link

Delete pic from point #21

Closed theriex closed 5 years ago

theriex commented 5 years ago

There needs to be a way to delete a pic from a point. You can upload and replace the existing pic with another one, but it would be helpful to be able to actually delete it. Possibly it could be marked as unavailable instead, which would allow for pics to be temporarily removed if necessary, while leaving the pic data available for later restore.

theriex commented 5 years ago

Added a "Delete pic" checkbox to the pic editing part of the form and verified that it works. That solves the immediate issue of being able to remove a pic, which is all that's needed right now.

In terms of pic backup and recovery, it is possible to add a prevpic field to the point without blowing the max object size because pics are resized to max 160x160 on upload. The idea would have been that on new pic upload or delete, the current pic data would be saved to prevpic. That provides some possible recovery, but it is not foolproof, and I'm worried about setting a precedent for image recovery. This is not a pic storage repository, it's an educational reference. The source pics are elsewhere and should remain so.

The other consideration was to have a /removepic endpoint for a site admin to be able to remove a pic due to inapropriate content, DMCA etc. My preference is to contact whoever put the pic up and have them deal with it so they understand what is going on. If that ends up taking too much time, then automation support can be considered then.