rejetto forum

Refuse File Download

vbn · 9 · 4236

0 Members and 1 Guest are viewing this topic.

Offline vbn

  • Occasional poster
  • *
    • Posts: 36
    • View Profile
OK...Now I know the filters concept...but my setup as just the root folder setup as "Real Folder" and there are MANY folders and files served from within it....Many people have put their image files (jpg/png) and serving through HFS which causes lot of connections

How do I restrict HFS to allow only certain file types to be downloaded (or vice versa) ... not just hide them because people have direct links to these images in forums and causes lots of connections during peak time


Offline vbn

  • Occasional poster
  • *
    • Posts: 36
    • View Profile

Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
In version 266,
Right click folder in vfs > Properties > Flags > check "No Download" ?
Or remove the user's access to these files/folders in Permissions


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13520
    • View Profile
if you can't flag them with "no download" because they are in real folder, then you can use a short script, but this requires you to be using version 2.3

press ALT+F6 and add this little script

[+download]
{.disconnection reason|Forbidden file|if={.match|*.jpg.}.}
« Last Edit: August 26, 2010, 11:29:43 AM by rejetto »


Offline vbn

  • Occasional poster
  • *
    • Posts: 36
    • View Profile
I added the following in for png files :

[+download]
{.disconnection reason|Forbidden file|if={.match|*.png.}.}

...but HFS is still serving them...is it supposed to restart to take in effect ?


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
Code: [Select]
[+download]
{.disconnection reason|Forbidden file|if={.match|*.jpg.}.}

Works great when added to hfs.events in 2.3 beta 266 here, no
restart needed, just save the change to hfs.events

Quote
Right click folder in vfs > Properties > Flags > check "No Download" ?
Or remove the user's access to these files/folders in Permissions
Works here as well


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13520
    • View Profile
did you press ALT+F6 ?
did a new window appear?
are you using version 2.3 ?


Offline SilentPliz

  • Operator
  • Tireless poster
  • *****
    • Posts: 1298
  • ....... chut ! shh!
    • View Profile
Code: [Select]
[+download]
{.disconnection reason|Forbidden file|if={.match|*.jpg.}.}

I just tried this script ... for me also it does not work.

This seems to block the event [+download completed] but the files are still downloaded & downloadable.
« Last Edit: August 27, 2010, 05:18:24 PM by SilentPliz »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13520
    • View Profile
whoops, the script is wrong :)
use this


[+download]
{.disconnection reason|Forbidden file|if={.match|*.png|%url%.}.}