NetTalk Central

Author Topic: How do I prevent specific file from being downloaded  (Read 3660 times)

Big Ian

  • Newbie
  • *
  • Posts: 31
  • I wonder what happens if I press this button
    • MSN Messenger - ian.holdsworth@gmail.com
    • View Profile
    • Email
How do I prevent specific file from being downloaded
« on: March 31, 2008, 06:48:29 AM »
Hi Gang

I have an issue where I'd like to stop certain files being downloaded by certain users from my web folder.  Now I can detect when the files been requested however how do I get it to redirect to another page instead of downloading the file?

Cheers

Big Ian
Ian Holdsworth
Ram Ltd

ccordes

  • Sr. Member
  • ****
  • Posts: 384
    • View Profile
    • Email
Re: How do I prevent specific file from being downloaded
« Reply #1 on: March 31, 2008, 08:40:45 AM »
If they are selecting the file from a list, then filter the list before displaying it.
If they are typing the file from the browser, then you could intercept that and just call another page and return.
If user = restrictedguy
   DocNotAvailable(p_web)
   Return
end

If it is a page they are getting, then you could put some code like the above in the procedure setup for the restricted page.

hth
chris
Real programmers use copy con newapp.exe