# How to show a download count on files uploaded to a post (Pro hosting, theme component only)?

**URL:** <https://meta.discourse.org/t/how-to-show-a-download-count-on-files-uploaded-to-a-post-pro-hosting-theme-component-only/417810>\
**Category:** Extras\
**Created:** [19 בנובמבר,‏ 2026,‏ 6:51am UTC](https://meta.discourse.org/t/how-to-show-a-download-count-on-files-uploaded-to-a-post-pro-hosting-theme-component-only/417810 "2026-11-19T06:51:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [19 בנובמבר,‏ 2026,‏ 7:44am UTC](https://meta.discourse.org/t/how-to-show-a-download-count-on-files-uploaded-to-a-post-pro-hosting-theme-component-only/417810/3 "2026-11-19T07:44:03Z")

</div>

> [@Rajat\_99](#):
>
> 1. Are you open to an external API for tracking if Discourse doesn’t expose attachment download events?

I would expect someone with 10+ years of experience in Discourse theme development to be able to figure out that Discourse exposes those counts in the post stream json 😉

Eg. the number of clicks on this link will be counted [https://www.rd.usda.gov/sites/default/files/pdf-sample\_0.pdf](https://www.rd.usda.gov/sites/default/files/pdf-sample_0.pdf)

Then look at [https://meta.discourse.org/t/how-to-show-a-download-count-on-files-uploaded-to-a-post-pro-hosting-theme-component-only/417810.json:](https://meta.discourse.org/t/how-to-show-a-download-count-on-files-uploaded-to-a-post-pro-hosting-theme-component-only/417810.json:)

 ![image](https://global.discourse-cdn.com/meta/original/4X/4/c/9/4c94dd9c5e8cb710758818bfe0c2936e56cb87ba.png)

and in Javascript you get a `post.link_counts` array.

---

_[View the full topic](https://meta.discourse.org/t/how-to-show-a-download-count-on-files-uploaded-to-a-post-pro-hosting-theme-component-only/417810)._
