Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 146
  • Last Modified:

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?
0
th94nn
Asked:
th94nn
  • 2
  • 2
1 Solution
 
marecsCommented:
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

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now