I have member area on my site, and there i have files available only to members. (also, not to all members, but to members of some role, and also they are further granulated by field condition, but that is a long story :)
But technically, anyone can download a file, if knowing the link to the file.
I would like to prevent downloading files by direct link, or by being logged of site.
It would be perfect if i can execute a script when someone asks for file by direct linking, to check if user is logged in, if he has a role that grants him download.
But if that is not possible, i would like to disable accessing files directly, they should be only accessible by browsing the site.
Thanks for clues