rejetto forum

Software => HFS ~ HTTP File Server => Beta => Topic started by: eddy on November 23, 2013, 05:48:14 AM

Title: speed limit for file format
Post by: eddy on November 23, 2013, 05:48:14 AM
hi, i don't want to let users download songs fast because they can listen mp3 on 320kbps (40KB/s)
could you add separate speed limits for formats or folders/files? sorry can't find futures topic.
Title: Re: speed limit for file format
Post by: rejetto on November 24, 2013, 03:45:38 PM
there's no such feature and will likely never be.
But it can be done by scripting

Add an event script (menu > other options)
like this
Code: [Select]
[download]
{.set speed limit for connection|
  {.switch| %item-ext%|| mp3|40 | -1 .}
.}

if you want, you can complicate things, like adding OGG files to mp3, with same speed, and having other speed for AVI files. Here it is

Code: [Select]
[download]
{.set speed limit for connection|
  {.switch| %item-ext%|| mp3 ogg|40 | avi|200 | -1 .}
.}
Title: thanks
Post by: eddy on November 24, 2013, 04:19:54 PM
what else can i script and how?
will HFS 3 relised?(which should have upnp support as you said (http://www.rejetto.com/forum/hfs-~-http-file-server/dyn-dns-updater-momentally-detecting-of-ip-changing/msg1056461/#msg1056461))
Title: Re: speed limit for file format
Post by: rejetto on November 25, 2013, 12:26:37 AM
scripting is so powerful that's hard to be told what you can do with it.
HFS 3 is under construction, but i don't really have the time to work on it since long.
Title: Re: speed limit for file format
Post by: DAD1977 on March 26, 2015, 03:34:03 PM
Hello , help write a scripting with 2 simultaneous constraints :

- maximum speed for downloads files AVI or TAR - 50 kB/s
and maximum 1 simultaneous downloads files these types (AVI or TAR) for single IP-adress.

I want, one IP could not simultaneously download 2 or more movies (avi) or archives (tar). Also could not download using "Download manager" with multiple streams . In this case, the download speed of these types of files should not exceed 50  kB/s.

I understand that it is necessary to add the above script
limit on the number of simultaneous downloads for single adress

Code: [Select]
[download]
{.set speed limit for connection|
  {.switch| %item-ext%|| avi tar|50 | -1 .}
.}

I think, to use the command ".current downloads", but not know how.
Tell me, please .
Title: Re: speed limit for file format
Post by: rejetto on March 29, 2015, 11:59:07 AM
menu > limits > max simultaneous downloads from single address > 1

this option and the script you already have should be enough
Title: Re: speed limit for file format
Post by: DAD1977 on March 30, 2015, 10:03:20 AM
Thanks for the quick reply.
About this function I know. I'm more interested in how to make this function (max simultaneous downloads from single address) is applied for only to AVI files.

This is due to the fact that if this  function (max simultaneous downloads from single address) is enabled , the download pages with lots of pictures and icons errors occur . On the page a few photos from the first time are not loaded. I think that the requests for uploading photos to the pages partially blocks HFS. It is necessary to update the page again . Chat is similar to the first time will not boot.

Title: Re: speed limit for file format
Post by: rejetto on April 01, 2015, 07:35:04 PM
you have to do it in the opposite way, you should set the limit for the downloads, and then exclude the stuff that must not be limited.
To get this you should right click on the folder containing the stuff that you DON'T want to limit > properties > file masks > don't consider as download (mask)

there you can enter "*" to say that all the files in the folder should be excluded, or else you can decide to enter *.jpg;*.gif