Privacy: Cache of deleted media uploads


i hope this is the right way to ask about this detail:

I have some privacy concerns.

Assume i accidentially selected the wrong file in the file-select-dialog of my browser while creating a toot.
The media/image is immediately uploaded to the instance.

What happens with this image if i choose to delete it and select another image (or decide to not post any image after all)?

Is that image that was uploaded in the first place properly deleted?
Is it cached somehow and deleted by cronjob like house-keeping task?



1 Like

Media that is not attached to any post is deleted after 24 hours. This is for two reasons: 1) there’s a delay between uploading media and creating a status, so media needs to be able to stick around for at least some period of time unattached, and 2) media attachments need to properly handle “delete & redraft”, where you want to write a different status using the same media.

Deletion of media is handled by the MediaCleanupScheduler, which is run automatically by sidekiq, and does not require any admin intervention or setup to run.

Moderation note: I’ve deleted a post from this thread that answered the question incorrectly.

1 Like

Thanks a lot for your Reply.
It already clarifies a lot!

however, i have a follow up question:

Are images uploaded to their “final destination”? Or are they put into, e.g. /tmp and when sending the Toot are moved to /media/ as their final destination?

The reason i’m asking is, because of Backup strategies. If the instance Admin decides to run a Backup every few hours (or even every 24 hours might be enough) there is a chance he will include the temporary media into his backup, worst case forever and unencrypted…

If Images would be stored in a temporary place first, this temporary place could be excluded from backups to prevent this situation.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.