Skip to content

Media deletion admin commands

Benjamin Lee requested to merge benjamin/media-admin-commands into main

Adds a command to delete individual files and a command to delete all remote files (possibly restricted to a specific origin). I tried to keep refactoring to a minimum while not making things actively worse here. I don't want to block being able to clear out the abuse media from the db behind fixing the schema.

In the future, I'd like the ability to restrict delete-remote-media-files to a time range, but didn't implement that here because we don't store media creation timestamps in the db currently. In theory, we can guess them based on the filesystem ctime, but that's slow and unreliable.

Edited by Benjamin Lee

Merge request reports