leegodden Posted February 4, 2011 Share Posted February 4, 2011 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 More sharing options...
litebearer Posted February 4, 2011 Share Posted February 4, 2011 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) Link to comment https://forums.phpfreaks.com/topic/226660-folder-size-for-uploads/#findComment-1169806 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.