Forum Moderators: mack
What I'm getting at this moment is either...
-- A browser window opens, and it takes minutes as it prepares a meaningless array of binary alphabet soup for the screen
-- The file automatically begins playing through the computer speakers as some sort of sub-function invoked by the browser itself.
What I want is
[1] User clicks on the link, then [2] The file normally downloads
As for the download itself, perhaps it should ask the user where to put it. That's an ancillary detail for later. What I want is the HTML code to invoke a file download when the user clicks the link.
A choice between opening or downloading might be okay. I'm trying to avoid big-time bandwidth from users who want to listen to the same WAV file multiple times.
I checked a couple of free HTML tutorial sites, and couldn't find the code for this. Suggestions, examples, and instruction are both welcome and requested.
One 'workaround' is to upload the files to your server in a zipped (or similar) format
I have a hunch that no browsers (by default) will unzip anything
I'm not sure how well this approach would work across platforms though
www.webdiner.com Add A Downloadable File to Your Web Site [webdiner.com]
Windows: Zip
Mac: Stuff
Zipping and Stuffing programs are available at Tucows and Shareware.com.Files that are not zipped or stuffed... ... ...
To stream it, I created a .m3u file. If the user clicks on that, they get the same Open/Save choice. Save saves the text file (which isn't very useful usually). Open opens the .m3u file which causes the mp3 file to stream.
Maybe you are encountering a "MIME type" problem. <- That's the term to do a web search on. You might have to specially define the MIME type in your server configuration. (In Apache, it's cpanel > MIME Types.)
When a screenful of garbage displays in the browser, it's usually a MIME type problem. In IE security settings, there is an option, "Open files based on content rather than file extension". How that option is set is also relevant to this type of problem.
[edited by: SteveWh at 6:15 am (utc) on July 10, 2007]
<Files *.wav>
ForceType application/octet-stream
Header set Content-Disposition attachment
</Files>
If you want to save bandwidth I'd suggest converting them to mp3 or wma, roughly 1/10th the file size at comparable quality. .wav is uncompressed.