# Attachment records cleared doing post rebake

**URL:** https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259
**Category:** Development
**Created:** [November 22, 2016, 2:50pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259 "2016-11-22T14:50:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![junaid\_pk14](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/junaid_pk14/32/67840_2.png) [@junaid\_pk14](https://meta.discourse.org/u/junaid_pk14)
#### Post date: [November 22, 2016, 2:50pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259/1 "2016-11-22T14:50:09Z")

</div>

Hello,

We have around more than 5 lac attachments in Vbulletin. When we imported these posts into Discourse same no of records were created in the ‘uploads’ table. Recently for some reasons we rebake the posts and all records from ‘uploads’ table removed automatically. I was checking the code and could not find any trace. Is there any flow in code that is deleting data from uploads folder? Thanks

@neil can you please check this? Thanks

Regards,  
Junaid

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 22, 2016, 3:05pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259/2 "2016-11-22T15:05:53Z")

</div>

If `clean up uploads` is enabled, uploads that aren’t linked in posts will be deleted.

---

<div class="post-metadata">

### Author: ![junaid\_pk14](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/junaid_pk14/32/67840_2.png) [@junaid\_pk14](https://meta.discourse.org/u/junaid_pk14)
#### Post date: [November 22, 2016, 3:23pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259/3 "2016-11-22T15:23:22Z")

</div>

Could you please share the configuration setting that i need to change? i checked but could not find the settings. Thanks

Junaid

---

<div class="post-metadata">

### Author: ![junaid\_pk14](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/junaid_pk14/32/67840_2.png) [@junaid\_pk14](https://meta.discourse.org/u/junaid_pk14)
#### Post date: [November 22, 2016, 3:25pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259/4 "2016-11-22T15:25:20Z")

</div>

ok found the configuration. Thanks

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [November 22, 2016, 3:25pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259/5 "2016-11-22T15:25:27Z")

</div>

Type `uploads` in the search on settings, it’s the second one.

---

<div class="post-metadata">

### Author: ![junaid\_pk14](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/junaid_pk14/32/67840_2.png) [@junaid\_pk14](https://meta.discourse.org/u/junaid_pk14)
#### Post date: [November 22, 2016, 3:42pm UTC](https://meta.discourse.org/t/attachment-records-cleared-doing-post-rebake/53259/6 "2016-11-22T15:42:56Z")

</div>

Thanks Falco, i found that.
