Click to See Complete Forum and Search --> : Audio File doesn't download on Mac


Floss
05-17-2007, 10:55 PM
Hi

I am working on a site that requires a downloadable audio and movie file.

The client supplied both files. I have uploaded them to the web space and they download fine from the site. However, my client uses a Mac and he is having difficulty with the Audio file. Apparently it doesn't download, just spits out a heap of code.

Can any body help me with this? I would be so greatful.

The link to the page is http://www.oliverwenn.com/showreel.php

Thanks anyone for any help you can give me.

Kind regards
Floss

dzysyak
05-21-2007, 10:19 PM
Try to send some headers before audio/video content, so the browser vill know that the file should be downloaded:


if(isset($_SERVER['HTTP_USER_AGENT']) && preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT']))
{
// IE Bug in download name workaround
ini_set( 'zlib.output_compression','Off' );
}

header ("HTTP/1.1 200 OK");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0, false");
header("Cache-control: private");
header("Pragma: no-cache");
header ("Content-Type: application/octet-stream;\n");
header("Content-Disposition: attachment; filename=video.mp3\n");
header("Content-Length: ". filesize($FilePath));