how to limit upoad files quota per user

Hello i am newbie for elgg..

Can any buddy suggest me how can i set limit of of total upload files size for individual user.. i read some where this feature available in classic elgg but its not in elgg 1.5.. so plz help me ..

Your help will be appritiated...


  • Hey experts presents over here plz help me out....

  • I don't have a clue how to do this, but sounds like a good idea. So count me in for the question.


  • The latest Tidypics has this. You can look at that code for an example of how to code this.

  • Hello Cash,

    Oh that's good, is it possible to do for files plugin, not only pics ?

    Uddhava dasa

  • Hello cash

    i am really thankful for your suggestion, i had take a look at latest tidypics and its great plugin and its works perfectly... but my problem is how can i set quota for individual user...  i.e.  for user A 10 mb and for user B i would like to set it 20 mb.. in this situation it will not work for me.

    I worked some what for my problem.. can we define file-quota link under action/admin/user where different options are available for admin for individual user...  but i really don't know how to code it..

    Any suggetion please...

  • extend the TidyPics upload action to check the uploaded filesize against some metadata you can store per user ( and if you have 1000'x users.. do this for each and every user;-) if size not allowed return false to block the upload OR re-code the upload action to do the same size checking.

  • @ dhrup 

    Hello, can u plz tell me where i can add new data filed for each user..  i think in users_entity table.?? nd i am trying to figure out how that tidypic's upload action works....

  •         $TidyPicsFileSize=999MB;
            $user = get_user_by_username($UserName);
            if ($user)
                $userGuid = $user->getGUID();
                if ( create_metadata($userGuid, "TidyPicsMax" , $TidyPicsFileSize ,'', 0, ACCESS_PUBLIC) )
                    ...ERROR WRITING METADATA


  • Hey dhrup i need this feture not just for the tidypics plugin.. I wish to add this for all files i.e files , videos(izap onserver videos ), tidypics files.... i have some idea how to implement it..all the files(files , videos, photos) which user is upload are stored in to the its own directory with the name of user, into  the data directory.. so can we implement a check function  for user upload directory size, each time when user try to upload new file and if the its limit is excceed he wil get error to send request to admin to increase his limit...