download binary files to browser
От | Louis Bertrand |
---|---|
Тема | download binary files to browser |
Дата | |
Msg-id | Pine.BSO.4.20.0101071151490.29456-100000@grendel.bts обсуждение исходный текст |
Ответы |
Re: download binary files to browser
|
Список | pgsql-php |
Hello, I'm keeping binary documents in PostgreSQL and serving them out with PHP, but I can't figure out how to make the download seamless for the non-technical end users. Let's say I have a table documents (docid integer, docoid oid, name varchar(256)) with a row (123, 123456, 'blah.xyz') that refers to some some sort of binary file. docid is the primary key. What should happen: user hits URL http://my.site.com/download.php3?docid=123 user sees the download window in his browser and the download window already has the file name as "blah.xyz". What happens: I retrieve the LO and send it out with the MIME type application/octet-stream and the download window comes up with the file name "download.php3" regardless of the file name. What headers can I send to fill in that file name? 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/
В списке pgsql-php по дате отправления: