# Mp4 being cleaned up even when referenced in a topic

**URL:** https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555
**Category:** Bug
**Created:** [October 14, 2016, 3:46pm UTC](https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555 "2016-10-14T15:46:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mcooper](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mcooper](https://meta.discourse.org/u/mcooper)
#### Post date: [October 14, 2016, 3:46pm UTC](https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555/1 "2016-10-14T15:46:43Z")

</div>

We have “clean up uploads” enabled and any .mp4 upload that users have added to a topic end up deleted/tombstoned after the cleanup process runs, even if they are currently referenced in a topic. I’m assuming this is not expected behavior. Any suggestions for resolving this issue?

We’re currently on version 1.7.0 beta 5. We just recently added .mp4 to the authorized extension list for uploads and noticed this happening. This only seems to effect .mp4 uploads.

Thanks!

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 15, 2016, 4:49am UTC](https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555/2 "2016-10-15T04:49:53Z")

</div>

any ideas here @tgxworld?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [October 18, 2016, 8:15am UTC](https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555/3 "2016-10-18T08:15:58Z")

</div>

After we started to onebox videos and audio uploads, we introduced a bug where the files were not properly tied to the post which resulted in those files being treated as orphan uploads.

[https://github.com/discourse/discourse/pull/4506](https://github.com/discourse/discourse/pull/4506)

@mcooper Thank you for reporting!

---

<div class="post-metadata">

### Author: ![mcooper](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mcooper](https://meta.discourse.org/u/mcooper)
#### Post date: [October 18, 2016, 5:41pm UTC](https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555/4 "2016-10-18T17:41:40Z")

</div>

Excellent! Thank you both for the quick response and fix.

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [October 18, 2016, 6:38pm UTC](https://meta.discourse.org/t/mp4-being-cleaned-up-even-when-referenced-in-a-topic/51555/5 "2016-10-18T18:38:44Z")

</div>


