Storage usage

Tried searching, didn’t find something similar.

Is there a way to generate a report of storage usage by user?

I run a very small discourse community- around 20 really active users, and around 40 total folks.

I bear the cost myself, which is fine.

I’d like to be able to do something like:

User A 1GB upload
User B 10GB upload
User C 100 GB upload

To have a relative reference on who is driving storage cost.

Any ideas?

1 Like

Would something like this fit the bill?

SELECT 
    user_id, 
    ROUND(SUM(filesize)/1048576.00,1) AS "Storage (MB)"
FROM uploads
GROUP BY user_id
ORDER BY 2 DESC
LIMIT 100
3 Likes

I will give it a try, thank you!

1 Like

You could conceivably make a custom badge that used something like the suggested query to give people a badge when they hit each of the thresholds.

2 Likes