I have a drupal site with many users.

How to add space to individual registered users in drupal site? Each user can be alloted a maximum space of 500MB for all his events, messages, videos and hotlist. How could this be done?


A disc quota is one thing but also checking user-content in the db could be tricky :-). Never done something like this but here's what I would try:

But as I said that checks only stuff inside the files table. No other content (text inside fields, cached content, thumbnails...) will be handled.

| improve this answer | |
  • 1
    It also doesn't make sense to measure text in MB's for this. You better have a number of limitations that you check separately (like 200MB files, 100 events, 20 videos, ...) – Berdir May 19 '11 at 13:18
  • I agree with @berdir, you'd be (infinitely) better designing this around a system of individual limits per content/media type. – NikLP May 19 '11 at 16:48
  • Yea, I think so, too. Question is, what is the reason behind the quota? – nonsenz May 19 '11 at 18:01
  • Thanks nonxenz and I have one doubt, Is it possible to allocate space to indevidual user in drupal site – Narenra May 20 '11 at 6:59
  • check out the file_space_used() link again. It says: "Determine total disk space used by a single user or the whole filesystem." But as I said before, it just checks the size of files registered inside the files table. – nonsenz May 20 '11 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.