Re: download binary files to browser - Mailing list pgsql-php

From Louis Bertrand
Subject Re: download binary files to browser
Date
Msg-id Pine.BSO.4.20.0101071309160.29456-100000@grendel.bts
Whole thread Raw
In response to Re: download binary files to browser  (Stephen van Egmond <svanegmond@bang.dhs.org>)
List 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@bertrandtech.on.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@bertrandtech.on.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");
>
>


pgsql-php by date:

Previous
From: Stephen van Egmond
Date:
Subject: Re: download binary files to browser
Next
From: Frank Joerdens
Date:
Subject: Re: [GENERAL] PHP and PostgreSQL