XFileSharing Pro - Limited 500mb files and above for premium user download only

Message
Author
th3hotcake
Posts: 51
Joined: Apr 07, 2009 7:24 pm

Limited 500mb files and above for premium user download only

#1 Postby th3hotcake » Apr 10, 2009 6:33 am

Is there a way to limit a certain type file size for premium users only?

In the settings I've set free users file upload limit to 500mb. But premium users can upload 2GB files. But I tested this by uploading a 2GB file and the free users were still able to download it.

How can I limit this?

Thanks

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#2 Postby PilgrimX182 » Apr 11, 2009 1:05 am

In index.cgi find this line

Code: Select all

$ses->PrintTemplate("download1.html")  unless $file;
and add below:

Code: Select all

$ses->message("Register premium account to download big files") if $file->{file_size} > $c->{max_upload_filesize}*1024*1024;

th3hotcake
Posts: 51
Joined: Apr 07, 2009 7:24 pm

#3 Postby th3hotcake » Apr 11, 2009 3:35 pm

thanks!