Auto purge uploads from old deleted posts

Hey! I think this got somewhat fixed in the last week…

We now have an automation[1] to remove deleted posts upload markdown, for example:

 Hey it is a regular post with a link to [Discourse](https://www.discourse.org) 
 and an image: ![logo.png|100x200](upload://gj6GJHlc1Sa5YXuGz549oXBbcFv.png)
 and a file: [small.pdf|attachment](upload://3bWzVVoRhUXxi7tiPenInoebHyX.pdf) (130 Bytes)

When the automation has run in this post, this will be the revisioned version:

 Hey it is a regular post with a link to [Discourse](https://www.discourse.org) 
 and an image:
 and a file: 

And because these uploads are now orphans, they will be picked up by the cleanup uploads job


Also, if you are self-hosted, you can update the cache control directives with s3_stale_while_revalidate and s3_max_age settings


  1. Remove upload markup in deleted posts is the automation name ↩︎

1 Like