• @b3nsn0wMA
    link
    fedilink
    English
    110 months 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

  • @b3nsn0wMA
    link
    fedilink
    English
    1
    edit-2
    10 months 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