rejetto forum

Download Quota

AYEHAN · 24 · 10148

0 Members and 1 Guest are viewing this topic.

Offline AYEHAN

  • Occasional poster
  • *
    • Posts: 92
    • View Profile
is there a way to limit the downloaded bytes per hour or daily basis? for logged in users only

1) X Mb is allowed to download per hour or per day
2) X files are are allowed to download per day ... no counting about downloaded size in total

which ever is possible .. both will do the same :) for me atleast
« Last Edit: March 14, 2009, 12:40:12 PM by AYEHAN »


Offline Kremlin

  • Tireless poster
  • ****
    • Posts: 137
    • View Profile
I find this idea also quite interesting, for example when you have large amounts of files of which anyone has access, sometimes they will list too many on their download manager preventing others from having a chance to download something else with good speed, or on the other hand not overloading Upload bandwidth on limited home connections.

Anyway template wise you would have to log how much has been downloaded from the server at a certain time and suspend sharing upon reaching the logged download total + limit, but i doubt that's possible at this time and would be easier if done with a HFS option (more work for rejetto  :P).

Some programs like KerioWinRoute Firewall have such account quota manager abilities, but with that they would need to login to the Kerio System before entering your server.
« Last Edit: March 14, 2009, 08:27:11 PM by Kremlin »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
the idea of the quota is interesting and already in to-do.
BUT
what should be the rule?
AYEHAN made 2 examples, but i fear there are infinite cases, and needs.
i think this must be solved with macros.

i guess a mixture of event [download complete] and setting account notes will do.
setting account notes is not available yet. but will be soon.


Offline Kremlin

  • Tireless poster
  • ****
    • Posts: 137
    • View Profile
x MB/Files per Day/Week/Month per IP/User I think would cover a lot although the file bit might get tricky when pause/resuming in download manager a file.

Edit: i've now read your reply better and an issed 'download complete' would indeed solve the pause/resuming problem.
« Last Edit: March 16, 2009, 01:08:32 PM by Kremlin »


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
event [download complete] and setting account notes will do.
http://www.rejetto.com/forum/index.php?topic=6719.msg1041717#msg1041717
When I tested [download complete] in events to use with special log I found
it lists everything that loads/downloads on the page, .gif,/~img, etc. Setting file mask for
the folder didn't help. Even setting don't log on each individual file didn't work.
Unless theres a macro fix for this wouldn't it be hard to accurately set a quota?


Offline Kremlin

  • Tireless poster
  • ****
    • Posts: 137
    • View Profile
Why not filter everything within the template folder? On the other hand could be solved using MB instead of nº of files


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
mmm, yes, we must decide what to do with it.

1. we may fire the event only for what HFS consider downloads, instead of every file.
difference may be as [request completed] and [download completed].

here another question arises: should [download completed] be followed by a [request completed] ? (a download is also a request, and indeed [request] is fired before [download])

2. i may rename [download completed] to [request completed] and then offer a symbol %type% that will turn to "download", or "archive" or "other" (for all other requests).



do you like any of these paths, or want to suggest another?
opinions welcome


Offline Kremlin

  • Tireless poster
  • ****
    • Posts: 137
    • View Profile
When 'Fully Downloaded message' is triggered we simply add 1 file to the IP/User quota. Couldn't understand quite well your last statement (the 2 path's i meen).

PS. Limiting through nº of files would only 'work' in a server which hosts similar size files, with the MB system having a larger adaptation.
« Last Edit: March 17, 2009, 12:37:56 PM by Kremlin »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
my last post was not about quota, but focused on how the [event] should work.

both ways will be ok for the quota system, it's a matter of taste.

i guess method 1 is easier for the people.
« Last Edit: March 17, 2009, 01:22:06 PM by rejetto »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2060
    • View Profile
It is easier  to have several different sections, by knowing which one makes what, and only what with what she is made for. Or then to have a single section and to have to make a continuation of macro
[request completed]
{.if|%type%=download| ..... .}
{.if|%type%=archive| ....... .}
{.if|%type%=upload| ....... .}
{.if|%type%= xxxxxx| ....... .}

If we are reduced to these obligations then for my part I would make an entorce to it by using the call to the other sections for reduce the possible errors during the conception of the template

[request completed]
{.$%type% completed.}

[download completed]
DOWNLOAD ACTION
[archive completed]
ARCHIVE ACTION
[upload completed]
UPLOAD ACTION
[xxxxx completed]
xxxxxACTION
........

It will be also easy as the old method  :D
« Last Edit: March 19, 2009, 05:11:35 PM by mars »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2060
    • View Profile
[request completed]
{.$%type% completed.}

haha, nice workaround

I was going to forget to indicate the possibility of using  macro switch switch

[request completed]
{.switch|%type%|download|{.$download completed.}|upload|{.$upload completed.}|archive|{.$archive completed.}|{.$default completed.}.}

 ;)

Quote
that event is for actions, that html stuff will be just discarded

 ;D ;)
« Last Edit: March 19, 2009, 05:13:19 PM by mars »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
that event is for actions, that html stuff will be just discarded


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
Now I'm confused (not unusual for me) :)
I had  [download completed] and [upload completed] with
append to special log in HFS Events working in 229 test directory.
In build 230 it no longer works and I assume it was changed, but to what?
I've tried the code in this thread in various ways, with no luck?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13517
    • View Profile
please post the code that used to work forr you