Hi Joe!

You can add a mime-type entry in your web.xml to specify this:
<web-app>
...
<mime-mapping>
    <extension>mp3</extension>
    <mime-type>audio/mpeg</mime-type>
  </mime-mapping>
...
</web-app>


On Tue, Jul 21, 2009 at 12:59 AM, Joe Wass <[email protected]> wrote:

>
> Hi,
>
> This is really a servlet question, but I'll ask here because it is a
> Lift project I'm having a problem with.
>
> I have some media files (MP3s) which aren't being given the correct
> MIME headers. I have other binary files (GIFs, PNGs, JPGs) which work
> fine but when I visit the URL for the MP3 file, it renders the binary
> stream as text in the browser rather than identifying the file as an
> MP3. I'm no expert at this, but I assume it's the servlet container
> not identifying the file type and therefore not sending the correct
> MIME header. The files are stored on disc and are being served
> statically, no Scala or Lift code involved.
>
> Works fine with Jetty on my dev machine; the problem happens when I'm
> running Winstone on the production machine. I'd rather not change
> container for the sake of the problem although I'll switch to Jetty if
> I really can't solve this.
>
> Any suggestions?
>
> Cheers
>
> Joe
>
> >
>


-- 
Viktor Klang

Rogue Scala-head

Twttr: viktorklang

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to