# List all uploads of a Post/Topic

**URL:** <https://meta.discourse.org/t/list-all-uploads-of-a-post-topic/53507>\
**Category:** Development\
**Created:** [29.Ноябрь.2016 01:35:03 UTC](https://meta.discourse.org/t/list-all-uploads-of-a-post-topic/53507 "2016-11-29T01:35:03Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![leo.proctor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/leo.proctor/32/216158_2.png) [@leo.proctor](https://meta.discourse.org/u/leo.proctor)\
**Post date:** [29.Ноябрь.2016 01:35:03 UTC](https://meta.discourse.org/t/list-all-uploads-of-a-post-topic/53507/1 "2016-11-29T01:35:03Z")

</div>

Is there any method defined that lists all the uploads of a post or tell us which post upload belongs to? I see there are relations defined in Post model

> has\_many :post\_uploads  
> has\_many :uploads, through: :post\_uploads

But it is hardly used. If I upload an image to a post, it updates the “raw” field in Post to determine the uploads. There is no direct relationship. Why PostUpload is not used?

---

_[View the full topic](https://meta.discourse.org/t/list-all-uploads-of-a-post-topic/53507)._
