rejetto forum

how to allow download for specific file mask?

0 Members and 1 Guest are viewing this topic.

Offline andreybbrv

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
hi,

folder have no download flag but i need allow download only specific file mask (all images). how to do it?

thank you.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
if it's enough for you, the easier way is to set this value
*.jpg;*.gif;*.png
in folder > properties > file masks > files filter
so they don't see other files.


Offline andreybbrv

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
I know this way but this is not enjoy. For example: if you put on folder flag NO DOWNLOAD you will able see all html files which inside this folder.

I need do same but for images also.

Simple, users must see other files also but access only for images.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
it's not easy.
you need HFS 2.3, press ALT+F6 and put something like this
[+download]
{.disconnection reason|only images, sorry|if={.match|*.jpg;*.gif;*.png|%url%.}.}

i didn't test it, and you can find documentation at http://www.rejetto.com/wiki/index.php/HFS:_Event_scripts

this is going to affect all folders, but you can customize it so to affect only a dir. Read the fine manual.


Offline andreybbrv

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
thank you. but i need do it for many folders and not for 2.3 because 2.3 is not responde very often (i write about it in other subjects) :(


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13510
    • View Profile
it cannot be done in 2.2
and being many folders is a marginal problem