htaccess for download of WAVE file

M

me

Currently when I link to a Wave file using a <A href> tag it is
downloaded into the browser page and played by Quicktime. I would like
to give the user an option of either saving or opening the file, as
happens eg when a ZIP file is downloaded.

Is this something that can be coded through the .htaccess file in the
directory containing the .wav file? On another site I have

AddType application/octet-stream msi

for msi file type, is coding for wav similar?
 
P

Philip Ronan

Currently when I link to a Wave file using a <A href> tag it is
downloaded into the browser page and played by Quicktime. I would like
to give the user an option of either saving or opening the file, as
happens eg when a ZIP file is downloaded.

The user already has this option. You don't need to do anything else.
 
M

me

The user already has this option. You don't need to do anything else.

Yes, I realise the user already has the option of right clicking on
the Quicktime object and saving to local disk. The question is whether
the behaviour can be set to show the "run or save" dialog which is
customary with ZIP files etc.
 
A

Alan J. Flavell

Yes, I realise the user already has the option of right clicking on
the Quicktime object and saving to local disk.

How they invoke it depends on the browser and on its settings. Your
job is to honestly describe the content which you're offering.
The question is whether the behaviour can be set to show the "run or
save" dialog which is customary with ZIP files etc.

If that's your question, then mine would be "how do I configure my
browser to avoid this kind of interference by inconsiderate authors?"

If the user's browser consents to it, /your/ answer is the
"Content-disposition" header. Look it up for details. I still say
that Philip is right, and your job as a considerate author is to
honestly describe your content-type, not to try to second-guess what a
user might want to do with it.
 
T

Toby Inkster

me said:
Currently when I link to a Wave file using a <A href> tag it is
downloaded into the browser page and played by Quicktime. I would like
to give the user an option of either saving or opening the file, as
happens eg when a ZIP file is downloaded.

ZIP up your WAV file.
 
R

Rob McAninch

As stated, they already have the option.
ZIP up your WAV file.

Typically a binary file compresses little. The user may or may
not have a utility to unzip the file. And for all we know the
user may have a zip utility configured as a plug-in to unzip the
file on the fly.

This question has been beaten to death, the merits and the
caveats.

http://groups.google.com/groups?
as_q=force+a+file+download&as_ugroup=alt.html

(Get that all on one line.)
 
T

Toby Inkster

Rob said:
Typically a binary file compresses little.

Not true. Typically already-compressed files, such as JPEGs or MP3s
compress very little. An uncompressed WAV file though contains vast
swathes of repetitive bytes, so will zip up quite well -- usually to about
40% of the original size. (This of course depends on the recording: white
noise will barely compress at all; a recording of silence will probably
compress to about 10% of its original size, or less; music and spoken word
would be somewhere in between.)

Besides which, I wasn't recommending zipping the WAV file for the purpose
of making it smaller, but rather to encourage the visitor's browser to
offer a "Save As" dialogue box when downloading the file.
 
M

Matt Clara

Rob McAninch said:
As stated, they already have the option.


Typically a binary file compresses little. The user may or may
not have a utility to unzip the file. And for all we know the
user may have a zip utility configured as a plug-in to unzip the
file on the fly.

This question has been beaten to death, the merits and the
caveats.

http://groups.google.com/groups?
as_q=force+a+file+download&as_ugroup=alt.html

(Get that all on one line.)

<http://groups.google.com/groups?as_q=force+a+file+download&as_ugroup=alt.ht
ml>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top