There are some situations in which people want to have uploads kept in Discourse that are not strictly associated with existing Discourse models and properties that support uploads, i.e. “whitelisted” orphaned uploads.
For example some people want to use the Custom Wizard plugin to upload content associated with a topic (not a post per se).
The issue is that the
clean_up_uploads job removes all orphaned uploads. It’s exceptions are limited to urls in specific site settings.
You could of course turn off
clean_up_uploads, or increase the
clean_orphan_uploads_grace_period_hours, which is what I’m sometimes forced to do. But this is not ideal.
Maybe there’s another way of “whitelisting” orphaned uploads from a plugin that I’m not seeing, but if not, it’d be great to add some mechanism of doing that into the upload cleanup process.
I’d be happy to prepare a PR along these lines, but I’m wondering if this is something others see as an issue.