this post was submitted on 16 Sep 2023
3 points (100.0% liked)

Pricefield.org Meta

114 readers
1 users here now

Suggestions, technical issues, complaints, anything concerning the instance


Welcome to the Pricefield corner of Lemmy! Here's a quick list of the communities you may find here:

> ♥ Pricefield ♥ <

> Life is Strange <

> LiS Franchise <

> Life is Silly <

(feel free to click, we made sure that the links will open on your own instance)

founded 1 year ago
MODERATORS
 

Hey was wondering if you would be able to purge an image I posted from the cache. I deleted the post but its still cached as an image object and displayed on other instances

https://pricefield.org/pictrs/image/bb92d53c-0cd2-4d5b-91c7-9c0a18183de1.webp

top 2 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago)

yup, doing it

you can also send me a private message on matrix next time you need something like this done, so that the url isn't shared publicly

[–] [email protected] 1 points 1 year ago

i hate lemmy so much

finally figured out how to do it. i went through like 3-4 different ways until i managed to actually talk to pictrs for once, and of course the endpoint was different than in the public documentation because the thing on github only tracks it until 0.1.4 (while we run 0.4.0). plus i've never seen a file genuinely crash github (it always returned 500 on one of these, lol), and so on and on...

anyway, before i devolve into incoherent rambling about poorly documented and counterintuitive rust code, here's the command that worked for me:

$ curl -X POST -H 'X-Api-Token: [api key]' [pictrs container]:8080/internal/purge?alias=bb92d53c-0cd2-4d5b-91c7-9c0a18183de1.webp

if any instance admins are reading this, make sure you actually do have a pictrs api key set up. the right environment variable is PICTRS__SERVER__API_KEY, as opposed to the PICTRS__API_KEY that comes in the docker-compose file (at least on 0.4.0, maybe this was different on an earlier version). that's probably why purging the post didn't work.

anyway, the picture has been purged, and i sent out a cloudfront invalidation immediately after that's been confirmed, so it should be gone pretty much everywhere by now