WordPress.org

Ready to get started?Download WordPress

Forums

WP-Filebase Download Manager
Bandwidth Limit daily/monthly not correctly working (5 posts)

  1. Schroeffu
    Member
    Posted 1 year ago #

    Hi there

    I will buy the PRO Version (Pasword feature is nice), but before the daily/monthly limitation should work correctly, otherwise it doens't seems to make sense.

    Example daily Limitation Problem:

    101 % (76.2 GB/75.2 GB) Heute
    And it's not blocking new Download Requsts, also not for guests.

    The monthly limit also doesn't work. Example:
    Monthly limit 2300 GiB, statistic;
    3 % (76.2 GB/2469.6 GB) - and it's now blocking downloads.

    I've a standard Apache, like "out of the box" on debian.
    Any Idea how to resolve it?

    http://wordpress.org/extend/plugins/wp-filebase/

  2. darksideno1
    Member
    Posted 1 year ago #

    can I ask you something because author is not respond to me.

    you have pro and you can set how much can visitors download per day? If I want they can download 20GB per day I can set it in pro version? or is this traffic limit as in free version?

  3. Schroeffu
    Member
    Posted 1 year ago #

    hi darksideno1

    no, i don't have the PRO version yet. I'm trying to get it work by the free version, afterwards i'll by the pro one.

    Yes, inside of the free version it's possible to set a global limit for MiB/GiB (MB/GB) per Day+Month for Downloads. Enough for my usecase.

    But - as long as it is not running by free version (but this feature is there already implemented), i don't pay for it, doesn't make sense.

    Greetings

  4. Fabian
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    here's patch to fix this issue:
    (apply on classes/Download.php)

    +++ Download.php	(working copy)
    @@ -42,8 +42,8 @@
     {
     	$traffic = wpfb_call('Misc','GetTraffic');
    
    -	$limit_month = (WPFB_Core::GetOpt('traffic_month') * 1048576);
    -	$limit_day = (WPFB_Core::GetOpt('traffic_day') * 1073741824);
    +	$limit_month = (WPFB_Core::GetOpt('traffic_month') * 1073741824); //GiB
    +	$limit_day = (WPFB_Core::GetOpt('traffic_day') * 1048576); // MiB
    
     	return ( ($limit_month == 0 || ($traffic['month'] + $file_size) < $limit_month) && ($limit_day == 0 || ($traffic['today'] + $file_size) < $limit_day) );
     }

    The numbers 1048576 (for MiB) and 1073741824 (for GiB) must be swapped.

    Regards
    Fabian

  5. Schroeffu
    Member
    Posted 1 year ago #

    Thank you! I'm gonna try this and if i'm not writing anymore here, its working and i've already buyed the PRO Version (Password Feature , yey) :-)

    Thanks again
    Regards Schroeffu

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.