Re: Safari download problems
| From: | Michal Migurski | Date: | Sun, 14 Mar 2004 02:01:33 +0000 |
| Subject: | Re: Safari download problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180370@lists.php.net to get a copy of this message | ||
>I have a script for downloading a file once it's been purchased. Works
>fine with any browser except Safari, which only downloads the first tiny
>portion of the file and then, of course, the user can't uncompress the
>incomplete archive. Here is my code:
>
>header('Content-type: '.$file_row['content_type']);
>header('Content-Disposition: attachment;
>filename="'.$file_row["filename"].'"');
>readfile('../../store/files/'.$file_row['filename']);
>
>Assume that filename = 'myarchive.hqx' and content_type is
>'application/hqx'
Not sure if this will solve your problem, but try tossing in a
Content-Length header so the browser knows how long of a file to look for.
I do all my development and testing with Safari, so I know for a fact that
it can handle dynamically generated downloads of all the proper header
fields are provided.
---------------------------------------------------------------------
michal migurski- contact info and pgp key:
sf/ca http://mike.teczno.com/contact.html