How can I send a file NOT in the web path?

M

Matthew Speed

My company produces confidential documents in pdf form that they email
to customers such as contracts and purchase orders. All these
documents gets store in a directory tree that has all the files for
each customer or vendor grouped in a directory.

I have been asked to make it so that they can download the documents
themselves. For security purposes, the root of the tree is not under
the web root directory.

All users must log in and their unique ID is stored as a session
variable.

Using the filesystem object I can do a directory listing on
documentroot\<their unique id> and get a list of the files. Since it
is not in the web path I cannot just simply create a hyperlink to the
document. Therefore, I would like to make each listing a clickable
link to an ASP page called getdocument.asp that will then retrieve
that document and send it to the user.

It is not clear to me how I can do an include of a document in this
manner. Can anyone help me out on this?

TIA
 
T

Tom Kaminski [MVP]

Matthew Speed said:
My company produces confidential documents in pdf form that they email
to customers such as contracts and purchase orders. All these
documents gets store in a directory tree that has all the files for
each customer or vendor grouped in a directory.

I have been asked to make it so that they can download the documents
themselves. For security purposes, the root of the tree is not under
the web root directory.

All users must log in and their unique ID is stored as a session
variable.

Using the filesystem object I can do a directory listing on
documentroot\<their unique id> and get a list of the files. Since it
is not in the web path I cannot just simply create a hyperlink to the
document. Therefore, I would like to make each listing a clickable
link to an ASP page called getdocument.asp that will then retrieve
that document and send it to the user.

It is not clear to me how I can do an include of a document in this
manner. Can anyone help me out on this?

Use this technique:
http://support.microsoft.com/?kbid=276488
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top