file name not known to client

I am receiving a form from a client, this contains a filename, this file is then found (in a secure area) and streamed back by a cgi program, (I send the mime types etc.) the only problem is: the client receives the name of the cgi program and not: mywordfile.doc, how can I get round this?
LVL 1
th94nnAsked:
Who is Participating?
 
marecsConnect With a Mentor Commented:
Use the header
Content-Disposition: attachment; filename="name.xxx"

It will work with recent browsers on Windows, but not on Macs.
0
 
rag2000Commented:
< listening >
0
 
th94nnAuthor Commented:
O.K. I will give it a go and let you know how I got on,....
0
 
th94nnAuthor Commented:
Thanks marecs I works just great! is this documented someware?
0
 
marecsCommented:
I'm glad it works. It is annoying working on a Mac where it does not work :-(, but then again, a Mac's notion of filenames is anyway screwball.

ftp://ftp.isi.edu/in-notes/rfc2616.txt
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.