Does anyone know how to make a MP3 download button, that when clicked will automaticaly download a MP3 file? Thanks
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
October 30, 2011 2:58pm
Subscribe [4]#1 / Oct 30, 2011 2:58pm
Does anyone know how to make a MP3 download button, that when clicked will automaticaly download a MP3 file? Thanks
#2 / Oct 30, 2011 2:58pm
Does anyone know how to make a MP3 download button, that when clicked will automaticaly download a MP3 file? Thanks
#3 / Oct 30, 2011 2:58pm
Does anyone know how to make a MP3 download button, that when clicked will automaticaly download a MP3 file? Thanks
#4 / Oct 31, 2011 6:14am
Simple enough - there are a few download file add-ons. Have a look at EE’s own Download Content add-on. There are others available on devotee.com that you can look at too, including some that protect the original link path and file name from view and track downloads.
#5 / Oct 31, 2011 10:54am
Hi ClubZion,
I assume you are talking about having an MP3 download instead of just opening in the browser. You should be able to do this with some PHP. Perhaps you could create a special template to achieve this or even better, an addon.
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=somefile.mp3');
header('Content-Transfer-Encoding: binary');
header('Content-Length: '.filesize('somefile.mp3'));
readfile('somefile.mp3');Or, another way you can supposedly achieve this by adding this to your .htaccess file:
AddType application/octet-stream .mp3Give these a try.
#6 / Oct 31, 2011 11:11am
Hi ClubZion,
I’ve merged your three threads that were the same into this one thread and moved them all over to the Community Help forums as this isn’t really a technical support question and so will be a better fit in that forum.
Thanks,
Mark