# Gain understanding of file uploads usage

**URL:** https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994
**Category:** Feature
**Created:** [24.Декабрь.2018 10:19:02 UTC](https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994 "2018-12-24T10:19:02Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Tarek\_Khalil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tarek_khalil/32/125517_2.png) [@Tarek\_Khalil](https://meta.discourse.org/u/Tarek_Khalil)
#### Post date: [24.Декабрь.2018 10:19:02 UTC](https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994/1 "2018-12-24T10:19:02Z")

</div>

I view the [file uploads problem](https://meta.discourse.org/t/list-of-all-uploaded-files/63714/4) as two fold. An admin wants to **1. gain understanding of their forum file uploads usage** , and **2. take actions on specific uploaded items.** I am hoping to focus on problem (1) in this post.

### Gain understanding of my forum file uploads usage

For admins to have a clearer view of their instance’s file usage, building on [Sam’s thoughts](https://meta.discourse.org/t/list-of-all-uploaded-files/63714/5), they need to understand:

1. How many files were uploaded in N period of time?
  - Broken down or filtered by file extension

2. Which users have the most/largest uploads?
  - **Sortable by:** size, extension

3. What are my largest uploads?
  - **Sortable by:** size, extension
  - **Filterable by:** extension

4. What is the size of files uploaded broken down by extension?

Other possible questions:

1. ~~How many [orphan file uploads](https://docs.google.com/document/d/1Dmj2jzPf4dk0ubCPyek6ezvgtWoPlwQzHPXU2cwtKZM/edit#heading=h.xj6bq27jebo6) do I have?~~ – this is [solved](https://github.com/discourse/discourse/blob/b3df4bee9ce7ade74aad9e49071864d1e0914129/app/jobs/scheduled/clean_up_uploads.rb)
2. Which posts (or maybe categories) have the most/largest uploads? – unsure about the benefit of this

### Possible order of work items …

1. Adding a report to answer: **what are my largest uploads?** we will call it: `Top Uploads`
2. Add support for custom filtering – more on this later, requires Ember changes.
3. Take feedback, iterate then figure out the next most useful report to add.

### The `Top Uploads` report can potentially look like this:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/8/18ac63a5f2a0507d95222759be7eeece3c1b050c.gif)

---

<div class="post-metadata">

### Author: ![Tarek\_Khalil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tarek_khalil/32/125517_2.png) [@Tarek\_Khalil](https://meta.discourse.org/u/Tarek_Khalil)
#### Post date: [24.Декабрь.2018 14:50:40 UTC](https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994/2 "2018-12-24T14:50:40Z")

</div>

[This is a first attempt](https://github.com/discourse/discourse/pull/6809) for introducing the `Top Uploads` report.

I didn’t account for filtering by extension yet, as it will involve an extra step to expose a generic filtering ember component (similar to the category filtering dropdown, but more generic)

---

<div class="post-metadata">

### Author: ![Tarek\_Khalil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tarek_khalil/32/125517_2.png) [@Tarek\_Khalil](https://meta.discourse.org/u/Tarek_Khalil)
#### Post date: [27.Декабрь.2018 18:09:32 UTC](https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994/3 "2018-12-27T18:09:32Z")

</div>

I took a little detour of attempting to add support for custom report filter for a report before carrying on with the `Top Uploads` report work, happy to [get your feedback](https://github.com/discourse/discourse/pull/6816) 🙂

---

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [28.Декабрь.2018 00:27:25 UTC](https://meta.discourse.org/t/gain-understanding-of-file-uploads-usage/104994/4 "2018-12-28T00:27:25Z")

</div>

Great work Tarek, and thanks for taking the time to explain your process, very much appreciated. I made few comments to open the discussion.
