Restricted access download

  • Thread starter Thread starter Luciano \(DOC\)
  • Start date Start date
L

Luciano \(DOC\)

I have some files into a directory, only logged users must be allowed to
download them.
I have created a page which verify if the user is logged in, but how can I
avoid that someone knowing the path of files write the url directly?
Thanks.

Luciano
 
Luciano said:
I have some files into a directory, only logged users must be allowed to
download them.
I have created a page which verify if the user is logged in, but how can I
avoid that someone knowing the path of files write the url directly?
Thanks.

Don't use the file path in your URL. Instead, pass the file name to a
download page in your query string. The download page can get the path
from the config file.

http://www.mydomain.com/download.aspx?file=whatever.pdf

might actually stream the file from

http://www.mydomain.com/qwerty/azerty/whatever.pdf

download.aspx should check that the user is logged in and can also be
used to track downloads - logging when/what/who.
 
Back
Top