Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Why Does Windows change the name of MP3 downloads


clp698

Recommended Posts

Posted

I have a site where I make available mp3 files that can be purchased and downloaded. The other day a lady called and said she had problems downloading a file as during the download Windows renamed the file like 106. So I tried to purchased and download the same file using XP and IE 6.0 and sure enough the name got chanted to a number and then Windows didn't know what do do with it. I then renamed the file giving it an .mp3 extension and it played fine in WMP. I then downloaded the same file using Firefox and it downloaded OK with the correct name and was playable. So, what is happening? Is it Anit-Virus, Internet Explorer, Firewall, or a combination of these things. I do all of my development on a Mac and thus have had no problems. It only seems to be a problems with XP and IE.

Posted

you could adjust the catalog\download.php file where it constructs the header for the download page. That should take care of it.

Posted
you could adjust the catalog\download.php file where it constructs the header for the download page. That should take care of it.

 

Forgive me for being so naive, but how it this done?

Posted

you need to specify the content-type on the header. For example if I had mp3 files that someone would download then I would specify something like:

 

header('Content-Type: audio/mpeg');

in the downloads.php If you have separate formats then you could extend the sql tables to accomodate for different file types.

Posted
you need to specify the content-type on the header. For example if I had mp3 files that someone would download then I would specify something like:

 

header('Content-Type: audio/mpeg');

in the downloads.php If you have separate formats then you could extend the sql tables to accomodate for different file types.

 

I made the changes as suggested and sure enough Internet Explorer downloaded the file as an MP3 file and was immediate playable. It, however, still renamed the file to a sequential number 109.mp3. Firefox does not rename the file.

Posted

there are other headers to specify filenames you should also set the Content-Disposition header and supply a filename. If you need more info on the http headers here is a link:

 

http://www.faqs.org/rfcs/rfc2616

 

My opinion for the particular hader case is that IE behaves while FF ignores.

Posted
there are other headers to specify filenames you should also set the Content-Disposition header and supply a filename. If you need more info on the http headers here is a link:

 

http://www.faqs.org/rfcs/rfc2616

 

My opinion for the particular hader case is that IE behaves while FF ignores.

You have been a great help. At least I have the downloads working. And you no doubt are correct that IE scrutinizes downloads more than FF.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...