W3C home > Mailing lists > Public > www-talk@w3.org > September to October 1996

Re: [Q] Changing default name in a FORM

From: Michael Naumann - ESO Garching +49 89 32006 430 <mnaumann@eso.org>
Date: Tue, 08 Oct 1996 13:38:10 +0200
Message-ID: <325A3D22.1ADA@eso.org>
To: www-talk@w3.org
Maurizio Codogno wrote:
> I have a script which selects a file and send it to the user. It
> is accessed via a form, with action POST.
> Unfortunately, the file is sent with the form's name as default name,
> and the user should rename it by hand.
> 
> Does HTTP/1.0 have any header line which can be used to overcome it?

Try sending 

  Content-type:        application/octet-stream
  Content-Disposition: attachment; filename="fname.ext"

HTTP header fields in the response of your script. This
at least works with Netscape Navigator since version 2.0

Although not specified in the HTTP 1.0/1.1 drafts the
the definition of Content-Disposition: can be found in 
http://www.internic.net/rfc/rfc1806.txt

<michael

-- 
** Michael Naumann * ESO * mnaumann@eso.org 
** http://www.eso.org/~mnaumann/
Received on Tuesday, 8 October 1996 07:38:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:19 GMT