# Adding a stable way of adding whitelisted "orphaned" uploads in a plugin

**URL:** <https://meta.discourse.org/t/adding-a-stable-way-of-adding-whitelisted-orphaned-uploads-in-a-plugin/128354>\
**Category:** Development\
**Created:** [9월 12, 2019, 2:15오전 UTC](https://meta.discourse.org/t/adding-a-stable-way-of-adding-whitelisted-orphaned-uploads-in-a-plugin/128354 "2019-09-12T02:15:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [9월 12, 2019, 6:54오전 UTC](https://meta.discourse.org/t/adding-a-stable-way-of-adding-whitelisted-orphaned-uploads-in-a-plugin/128354/2 "2019-09-12T06:54:15Z")

</div>

This is so clunky

> <https://github.com/discourse/discourse/blob/32b8a2ccffd50d78b8f7be6f0b524506cd2dbd7e/app/jobs/scheduled/clean_up_uploads.rb#L53-L66>

For reviewables @eviltrout introduced a general mechanism where arbitrary objects could be linked to a reviewable.

Moving to a similar system for uploads would be like moving multiple mountains. It would be a nice mountain to move though cause this current system is pretty fragile.

Easiest workaround you have for now is to create a hidden site setting with a data\_type for `:upload`. Then put it in the site settings table.

---

_[View the full topic](https://meta.discourse.org/t/adding-a-stable-way-of-adding-whitelisted-orphaned-uploads-in-a-plugin/128354)._
