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

Add admin API endpoint to delete or purge images from pict-rs #5563

Closed
5 tasks done
Nothing4You opened this issue Mar 29, 2025 · 4 comments · Fixed by #5588
Closed
5 tasks done

Add admin API endpoint to delete or purge images from pict-rs #5563

Nothing4You opened this issue Mar 29, 2025 · 4 comments · Fixed by #5588
Labels
area: media enhancement New feature or request
Milestone

Comments

@Nothing4You
Copy link
Collaborator

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support or the matrix chat.
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

Admins currently have to resort to calling the pict-rs API directly to purge images or delete aliases.

Describe the solution you'd like.

The simplest solution for the time being would be to provide an API that allows entering arbitrary pict-rs links and have Lemmy translate this into pict-rs delete/purge calls.
Both deletion and purge should be available as separate options, as it may be desirable to use them in different situations.

For the UI-side, this could be as simple as having a text input with a submit button.

Describe alternatives you've considered.

Make pict-rs directly accessible to all site admins.

Additional context

No response

@dessalines
Copy link
Member

Oh I guess when we removed delete tokens, we removed this ability.

We already have the ListAllMedia endpoint for admins, so whats needed is a DeleteImage that works for admins.

@Nothing4You
Copy link
Collaborator Author

yeah, and also an explicit purge endpoint would be good for certain types of media where you want to be sure that there are no other aliases keeping it alive

@dessalines dessalines added this to the 1.0.0 milestone Apr 1, 2025
@Nutomic
Copy link
Member

Nutomic commented Apr 1, 2025

Purge can be a boolean parameter for the admin delete endpoint.

@dessalines
Copy link
Member

There currently isn't one, only a delete_image for your own images, and its in the wrong place. I'll fix this now.

dessalines added a commit that referenced this issue Apr 2, 2025
- Also moving the list media endpoints, since these can go under a
  common heading.
- Fixes #5563
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: media enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants