Results 1 to 2 of 2

Thread: Audio File doesn't download on Mac

  1. #1
    Join Date
    May 2007

    Audio File doesn't download on Mac


    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

  2. #2
    Try to send some headers before audio/video content, so the browser vill know that the file should be downloaded:

    PHP Code:
    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)); 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles