Link alias

S

sdybvik

To secure files on a site with authentication we have put the
attachments in a folder outside the IIS web site like this:

D:\Documents\<ItemID>\filename.doc

where ItemID is a number which we use to check permissions inside our
application.

In order to download the file from the site we have made a binary
reader component (we could probably use SAFileUp or something instead,
but this works) to send the file through an ASP-file:

http://mysite/Docs/ShowDoc.asp?ID=<ItemID>

This works well.

So to my problem:
If I right click the link to save the file on my local computer (Save
target as), it will save the file properly, but the filename in the
Save As-dialog is ShowDoc.asp. I want it to be filename.doc instead.
Is it possible?

I've heard that on a Apache web server you can write the link like
this:

http://mysite/something/filename.doc?ID=<ItemID>

but then the server knows that it's
http://mysite/Docs/ShowDoc.asp?ID=<ItemID> it should load. If this is
possible in IIS, the Save As-problem will be solved. Hopefully.
 
R

Ray at

The method described here should work and will allow you to specify a
filename. The filename that's used in the physical path on the server does
not have to be what is used in the filename value in the header that you
return, I believe.

http://www.aspfaq.com/show.asp?id=2161

Ray at work
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top