Re: download binary files to browser

From: Louis Bertrand <louis(at)bertrandtech(dot)on(dot)ca>
To: svanegmond(at)home(dot)com
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: download binary files to browser
Date: 2001-01-07 18:12:46
Message-ID: Pine.BSO.4.20.0101071309160.29456-100000@grendel.bts
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Hey, that's probably what I've been looking for!

As for the mime type, I just read that there is a variable in recent
versions of PHP, $userfile_type, that may get sent up by the uploading
browser. I'll store that if availabe to give the user's browser the same
hint.

Thanks
--Louis <louis(at)bertrandtech(dot)on(dot)ca>

Louis Bertrand http://www.bertrandtech.on.ca/
Bertrand Technical Services, Bowmanville, ON, Canada
Tel: +1.905.623.1500 Fax: +1.905.623.3852

OpenBSD: Secure by default. http://www.openbsd.org/

On Sun, 7 Jan 2001, Stephen van Egmond wrote:

> Louis Bertrand (louis(at)bertrandtech(dot)on(dot)ca) wrote:
> > What headers can I send to fill in that file name?
>
> Look at content-disposition in the HTTP RFC.
>
> I do this in a similar application:
> header("Content-Disposition: attachment; filename=\"$original_name\"");
>
> it helps on the end-user side if you also report the correct
> MIME type for the document (i.e. application/msword).
>
> header("Content-type: $mime");
>
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message Adam Haberlach 2001-01-08 03:40:01 Re: PHP and PostgreSQL
Previous Message Stephen van Egmond 2001-01-07 17:41:37 Re: download binary files to browser