this post was submitted on 07 Feb 2024
9 points (90.9% liked)

Lemmy Support

4652 readers
1 users here now

Support / questions about Lemmy.

Matrix Space: #lemmy-space

founded 5 years ago
MODERATORS
 

Given a URL to an image on my lemmy instance, how can I (as an admin) permanently delete the image (and all cache/variants of the image)?

I operate a lemmy instance server. One of our users just submitted a GDPR Data Erasure request for an image. The image is orphaned, so it is not tied to any post or comment. We have a URL to the image only.

Images in lemmy are handled by the pict-rs service, which is itself distinct from lemmy. As stated in the lemmy documentation, there is a way to purge posts and comments, but there appears to be no way to purge a given image in lemmy through the WUI or lemmy API.

How can I entirely purge the image from my lemmy instance, given only the URL to the image?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 5 points 9 months ago (1 children)

You can call the delete endpoint with the pictrs token your lemmy instance is using to talk to pictrs.

It's quite well documented: https://crates.io/crates/pict-rs

[–] [email protected] 5 points 9 months ago* (last edited 9 months ago) (1 children)

Thanks, but I'm asking because I didn't find the reference documentation especially helpful.

It says I need the "delete token" or "alias". How do I get that for a given URL?

I'm looking for an example that describes how to construct the commands for the API calls knowing only the URL of the image.

[–] [email protected] 2 points 9 months ago (1 children)

Token is probably the guide in the url itself

[–] [email protected] 1 points 9 months ago

This seems to suggest that you have to get it from lemmy when you first uploaded the image