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
[Bug]: Purging a post/comment/user/community does not remove the uploaded media despite the doc claiming it does. #3931
Comments
Looking at the codebase, it appears that image uploads to pict-rs are not directly tracked in the Lemmy database. This makes it challenging to purge the image content associated with a post/comment safely, because there is no guarantee that the user who created the post/comment associated with an image is the same user that uploaded the image. A safer version of this functionality could be implemented as follows:
The behaviour for removing entities could then be updated as follows:
There are still some issues with this approach that I can see:
I'm happy to work on this, but before I do it would be good to get a Lemmy maintainer's perspective on this proposal. |
Make sure that you configured a pictrs api key both in pictrs settings and lemmy, otherwise purging will fail. Also make sure to force reload the image. With normal reload, it will appear to still exist due to caching. I added some tests for purging in #4183 which show that its working. @fhke Such a table was added in #3927. I suggest you test the functionality in 0.19 and then open a new issue if improvements are still needed. |
Requirements
Summary
Like the title said, purging a user or a comment or a post or a community does not delete the media posted from the database despite the doc claiming otherwise
Steps to Reproduce
Technical Details
N/A
Version
0.18.4
Lemmy Instance URL
Monyet.cc
The text was updated successfully, but these errors were encountered: