Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > htaccess for download of WAVE file

Reply
Thread Tools

htaccess for download of WAVE file

 
 
me@privacy.net
Guest
Posts: n/a
 
      01-16-2006
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?
 
Reply With Quote
 
 
 
 
Philip Ronan
Guest
Posts: n/a
 
      01-16-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> 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.

--
philronan [@] blueyonder [dot] co [dot] uk

 
Reply With Quote
 
 
 
 
me@privacy.net
Guest
Posts: n/a
 
      01-16-2006
On Mon, 16 Jan 2006 16:22:44 GMT, Philip Ronan
<(E-Mail Removed)> wrote:

>(E-Mail Removed) wrote:
>
>> 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.


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.
 
Reply With Quote
 
Alan J. Flavell
Guest
Posts: n/a
 
      01-16-2006

On Mon, 16 Jan 2006, (E-Mail Removed) wrote:

> On Mon, 16 Jan 2006 16:22:44 GMT, Philip Ronan
> >
> >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.


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.
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      01-16-2006
me wrote:

> 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.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
Rob McAninch
Guest
Posts: n/a
 
      01-16-2006
Toby Inkster <(E-Mail Removed)> wrote in
<news:(E-Mail Removed)5n.co.uk> :

> me wrote:
>
>> 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.


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.)
--
Rob McAninch
http://rock13.com
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      01-17-2006
Rob McAninch wrote:

> 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.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 
Reply With Quote
 
Matt Clara
Guest
Posts: n/a
 
      01-18-2006
"Rob McAninch" <(E-Mail Removed)> wrote in message
news:Xns974DA735AB6AFrock13com@216.196.97.142...
> Toby Inkster <(E-Mail Removed)> wrote in
> <news:(E-Mail Removed)5n.co.uk> :
>
> > me wrote:
> >
> >> 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.

>
> 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.)
>


<http://groups.google.com/groups?as_q..._ugroup=alt.ht
ml>

--
Regards,
Matt Clara
www.mattclara.com


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
superposition of a square wave over a sine wave Shiva VHDL 2 02-02-2009 02:49 PM
superposition of a square wave over a sine wave rara10 VHDL 0 01-30-2009 08:21 PM
How do i record and invert a sound wave in real time using Tkinter,tkSnack and wave modules? Karthik Python 0 09-05-2007 05:12 AM
square wave / sine wave generator red floyd C++ 5 06-21-2007 09:30 PM
perl file(.pl) file in my htaccess doesn't work Nospam HTML 3 08-15-2006 05:32 PM



Advertisments