Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 980799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:26:33+00:00 2026-05-16T04:26:33+00:00

I have an mp3 on an apache server. I want it to be downloaded

  • 0

I have an mp3 on an apache server. I want it to be downloaded as a file when a user visits the link. Instead quicktime, or google chromes media player will try and stream it.

Is there a fix for this with headers? Or is the only option so ‘right click save as’?

Edit Here is my header. Safari has stopped streaming, but chrome contines to do it.
Chrome seems to be ignoring this:

I can see the header has been changed correctly:

Date    Wed, 04 Aug 2010 00:14:35 GMT
Server  Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.11
Last-Modified   Tue, 03 Aug 2010 04:37:01 GMT
Etag    "2bbd692-79597d-48ce3de3f5540"
Accept-Ranges   bytes
Content-Length  7952765
Content-Disposition attachment
Keep-Alive  timeout=5, max=100
Connection  Keep-Alive
Content-Type    audio/mpeg

Is there anything else in the header that would cause this?

Edit Doing some research I found this: http://www.google.com/support/forum/p/Chrome/thread?tid=76de4f53f43f03d3&hl=en
Looks like there might be a bug in chrome preventing it from downloading.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T04:26:34+00:00Added an answer on May 16, 2026 at 4:26 am

    You want to set the Content-Disposition response header to “attachment”, and probably the “filename” field as well.

    Example:

    Content-Disposition: attachment; filename=foo.mp3;
    

    To accomplish this directly in Apache, try putting the following in your httpd.conf or .htaccess file:

    <FilesMatch "\.(?i:mp3)$">
      ForceType audio/mpeg
      SetEnvIf Request_URI "^.*/?([^/]*)$" FILENAME=$1
      Header set Content-Disposition "attachment; filename=%{FILENAME}e"
      UnsetEnv FILENAME
    </FilesMatch>
    

    EDIT:

    Added filename field to Apache configuration example, borrowed from this answer. You should be aware, however, of potential problems caused by filenames with non-US-ASCII characters in them: see this question.

    Alternatively, you could use a generic constant filename (since you know the extension already) like song.mp3, but this might not be an option depending on your circumstances.

    A third option would be to create a script to serve these MP3s, which can set the header and take care of stripping unwanted characters out of the filename.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small utility that I use to download an MP3 file from
File formats I would like to play include .wav, .mp3, .midi. I have tried
I have a page in JSP that list some file that could be downloaded
I have found a few libraries to edit MP3 tags (UltraID3Lib is great) but
I have an enum public enum FileExtentions { mp3, mpeg } And I have
I have created a few small flash widgets that stream .mp3 audio from an
Does anyone know of some mp3 playing code for the pocket PC. I have
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
(1) I have a site that serves up MP3 files: http://domain/files/1234567890.mp3 (2) I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.