how to send binary files and protect their file names

P

Patrice

Not sure if this is a problem with the client side name of the file or if
you want the user to think that he loads directly from an URL...

Do you use http://support.microsoft.com/kb/260519/en-us ? (note the filename
part that allows to tell which name you want client side)

Else you could handle the 404 error and use Server.Transfer to go to the
RequestFile.asp with the proper filename as a parameter. Client side the
user will think he's loading directly from an URL...
 
T

Tomas PAJER

Hello Patrice.

I have read that kb article, but it cannot be used. Yes, I can set the name
of the file in Response.AddHeader "content-disposition","attachment;
filename=fname.ext" header, but if the user wants to open the file, it is not
possible. There is no file In temporary internet files folder with that name.
It is still saved with the name derived from the url.

I think that the only option is to map the 404 error page to
requestFile.aspx and use Server.Transfer method. Thank you very much for that
good idea.

Tom
 
P

Patrice

Which browser ? This is not he behavior I have with IE6. It may append a
suffix such as [1] but it uses the filename correctly. Try perhaps to
enclose the name within ". Should 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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top