Solved

file name not known to client

Posted on 2001-06-25
5
134 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
  • 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This tutorial will discuss the log-in process using WhizBase. In this article I assume you already know HTML. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles abo…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now