Solved

file name not known to client

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is it true to say that Python is successor of Perl? 7 171
Batch File to find and replace a string 15 111
Convert MSI to MSM 1 58
how to pick specific file from ftp 13 56
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to dynamically set the form action using jQuery.

815 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

13 Experts available now in Live!

Get 1:1 Help Now