91
Lemmy's Image Problem (wedistribute.org)
submitted 7 months ago by hedge@beehaw.org to c/technology@beehaw.org
you are viewing a single comment's thread
view the rest of the comments

Deletions shouldn't be difficult because of the schema. For instance, this query: select display_name, ('https://your.lemmy.host/pictrs/image/' || pictrs_alias) as image_url, pictrs_delete_token from image_upload iu inner join local_user u on u.id = iu.local_user_id inner join person p on p.id = u.person_id; will list all media, with the display name of the user who uploaded them, and the token that can be used to delete the image. Obviously, this needs a where u.id = ? parameter to only expose the list to the right user, but adding a "delete old media" page really shouldn't be that hard. It'll require time, though, and with one of the two devs taking parental leave soon, I don't think there's that much dev time for a while.

The pieces are almost in place, they just need an API endpoint and some UI work.

[-] Penguincoder@beehaw.org 8 points 7 months ago

That query by itself in a vacuum is fine. Combined with many other triggers on the DB, and then federating that out before actually deleting from the local DB... well that is what creates all sorts of headaches.

this post was submitted on 18 Mar 2024
91 points (100.0% liked)

Technology

37664 readers
745 users here now

A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.

Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.

Subcommunities on Beehaw:


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS