# User Upload Reporting & Quota

**URL:** https://meta.discourse.org/t/user-upload-reporting-quota/45976
**Category:** Feature
**Created:** [June 17, 2016, 9:35pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976 "2016-06-17T21:35:03Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![fearlessfrog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fearlessfrog/32/119653_2.png) [@fearlessfrog](https://meta.discourse.org/u/fearlessfrog)
#### Post date: [June 17, 2016, 9:35pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/1 "2016-06-17T21:35:03Z")

</div>

We had a recent need to find where our uploads size was increasing quickly, so this feature request breaks down into two ideas:

(1) A way to see per user the file upload capacity used, i.e. a per user total uploads in mb.

(2) A trust-based or per-user upload quota limit that would either warn staff/admin that a quota was exceeded or prevent further uploading until the quota was increased.

Our support experience I am basing this request for feature discussion is here:

> [@Our disk space disappeared - how to find who/where?](https://meta.discourse.org/t/our-disk-space-disappeared-how-to-find-who-where/45798):
>
> Our free disk space went down by about a gig overnight, or rather the backup image size jumped up. We’re trying to figure out where it went, as we think a user may be uploading files to themselves via PM or something? Where are good places to start looking in Discourse for this type of info, i.e. where the upload allocation went per user?

---

<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: [June 17, 2016, 10:12pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/2 "2016-06-17T22:12:28Z")

</div>

There’s already a related warning that is sent when the entire host disk has less than 10% free space remaining:

> #### download remote images threshold
> 
> Minimum disk space necessary to download remote images locally (in percent)

When that gets triggered, remote images in posts are no longer downloaded locally and converted to local images. However I don’t know that it also blocks local direct uploads @zogstrip?

---

<div class="post-metadata">

### Author: ![fearlessfrog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fearlessfrog/32/119653_2.png) [@fearlessfrog](https://meta.discourse.org/u/fearlessfrog)
#### Post date: [June 17, 2016, 10:25pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/3 "2016-06-17T22:25:56Z")

</div>

> [@codinghorror](#):
>
> There’s already a related warning that is sent when the entire host disk has less than 10% free space remaining

Yep, that feature was very useful, and provided our first heads-up. The setting can also be tweaked from the default 10% too. After we got that warning and it ticked itself off (stopping local copy downloads) I don’t think direct uploads were stopped (actually fairly sure it didn’t).

The question was then what to do afterwards, i.e. check it wasn’t just Ubuntu gorging on security updates or something that Discourse users were busy with. I was ok because I could write a bit of SQL or navigate within Rails, but the feature is more for those not able/wanting/blessed/cursed to be doing that.

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [June 17, 2016, 11:28pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/4 "2016-06-17T23:28:00Z")

</div>

> [@Our disk space disappeared - how to find who/where?](https://meta.discourse.org/t/our-disk-space-disappeared-how-to-find-who-where/45798/7):
>
> I wonder if the trust\_levels could have a file/image quota added?

Like minds.

I was thinking the same thing. Something like a FIFO “you are almost out of upload space do you wish to continue?” - “warnimg if you continue some of your earlier uploads will be removed to make room for this one”

Are these Settings checked and 1 ?

> clean up uploads  
> Remove orphan unreferenced uploads to prevent illegal hosting. WARNING: you may want to back up of your /uploads directory before enabling this setting.

> clean orphan uploads grace period hours  
> Grace period (in hours) before an orphan upload is removed.

---

<div class="post-metadata">

### Author: ![fearlessfrog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fearlessfrog/32/119653_2.png) [@fearlessfrog](https://meta.discourse.org/u/fearlessfrog)
#### Post date: [June 17, 2016, 11:42pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/5 "2016-06-17T23:42:08Z")

</div>

> [@Mittineague](#):
>
> Are these Settings checked and 1 ?

Yep, all left as default. We are tempted to lower the 30 day default of ‘purge deleted uploads grace period days’, as that might help, but not quite sure what it does. Is there an easy query to find out what’s waiting there?

---

<div class="post-metadata">

### Author: ![clay](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clay/32/102156_2.png) [@clay](https://meta.discourse.org/u/clay)
#### Post date: [June 17, 2016, 11:44pm UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/6 "2016-06-17T23:44:29Z")

</div>

> [@Mittineague](#):
>
> “warnimg if you continue some of your earlier uploads will be removed to make room for this one”

This isn’t a good idea. In corporate environments, it could inconvenience other company members if earlier files are removed. In these instances, the solution likely will come from the IT department migrating to a larger server or something. I would recommend that you warn users that they are about out of space and then prevent them from uploading more if they run out, triggering a warning to the admins. Also, give the admins the ability to set blanket and per-user quotas for uploads and to individually increase an upload quota for a user, when needed.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [June 20, 2016, 9:26am UTC](https://meta.discourse.org/t/user-upload-reporting-quota/45976/7 "2016-06-20T09:26:40Z")

</div>

> [@codinghorror](#):
>
> However I don’t know that it also blocks local direct uploads @zogstrip?

Nope, it’s only used when pulling external images.
