Solved

file name not known to client

Posted on 2001-06-25
5
139 Views
Last Modified: 2013-12-25
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
Comment
Question by:th94nn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
marecs earned 200 total points
ID: 6226688
Use the header
Content-Disposition: attachment; filename="name.xxx"

It will work with recent browsers on Windows, but not on Macs.
0
 
LVL 3

Expert Comment

by:rag2000
ID: 6227159
< listening >
0
 
LVL 1

Author Comment

by:th94nn
ID: 6228431
O.K. I will give it a go and let you know how I got on,....
0
 
LVL 1

Author Comment

by:th94nn
ID: 6230159
Thanks marecs I works just great! is this documented someware?
0
 
LVL 5

Expert Comment

by:marecs
ID: 6230267
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

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question