Jump to content

folder size for uploads


leegodden

Recommended Posts

Hi Im building a file hosting script and need to do two things. I have two sets of users FREE and PAID. Both users can upload files to thier own folder, but free users can upload only 2gb of files and paid users can upload 10gb. Is there anyone who could give some pointers on how i can:

 

Allow different folder quotas/sizes for both users 

Stop both users exceeding their quota.

inform them when thier quota is full.

 

Hope someone can give me help on this

 

thanks

Lee

Link to comment
https://forums.phpfreaks.com/topic/226660-folder-size-for-uploads/
Share on other sites

Just a thought...

 

have a small database table (or add fields to existing user table)  where you have id, userid, maxquota, used - when user logs in check space available (maxquota - used) when uploading simple compare file size against space available - if the upload would exceed then redirect to message page that they are attempting to exceed quota

would require that paid and unpaid are all registered users (similar to this forum, where even though its is free, you still need to register in order to post)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.