The files below "skin/resources/".
(as said by http://doc.nuxeo.com/display/NXDOC/WebEngine+%28JAX-RS%29#WebEngine%28JAX-RS%29-Staticresources)
File is found, but with bad mimetype "text/plain" instead of "video/ogg":
oe@charlie:~$ wget -S http://marcie:8080/nuxeo/site/portal/skin/images/demomedia/intro.ogv
--2012-08-24 12:45:01-- http://marcie:8080/nuxeo/site/portal/skin/images/demomedia/intro.ogv
Resolving marcie... 10.0.0.19
Connecting to marcie|10.0.0.19|:8080... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=B85FEF72FA26C01B5A4F8DE20BA15B83.nuxeo; Path=/nuxeo
Last-Modified: Thu, 23 Feb 2012 14:58:36 GMT
Cache-Control: public
Server: Nuxeo/WebEngine-1.0
Content-Type: text/plain
Content-Length: 1132834
Date: Fri, 24 Aug 2012 10:45:04 GMT
Connection: keep-alive
Length: 1132834 (1.1M) [text/plain]
I succssfully can change the mime-type for the non-WebEngine public directory (below nxserver\nuxeo.war), I guess, these files are almost untoched by nuxeo, hence the tomcat way works: in file deployment-fragment.xml add:
<extension target="web#SERVLET">
<mime-mapping>
<extension>ogv</extension>
<mime-type>video/ogg</mime-type>
</mime-mapping>
now it works for the file http://localhost:8080/nuxeo/portal/intro.ogv (notice the missing "site/").
oe@charlie:~$ wget -S http://marcie:8080/nuxeo/portal/intro.ogv
--2012-08-24 12:46:21-- http://marcie:8080/nuxeo/portal/intro.ogv
Resolving marcie... 10.0.0.19
Connecting to marcie|10.0.0.19|:8080... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"1132834-1330009116000"
Last-Modified: Thu, 23 Feb 2012 14:58:36 GMT
Content-Type: video/ogg
Content-Length: 1132834
Date: Fri, 24 Aug 2012 10:46:24 GMT
Connection: keep-alive
Length: 1132834 (1.1M) [video/ogg]
How to change it for WebEngine? I guessed an extenstion point, but the one I found
http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.6-RC3/viewComponent/org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService/
has it already set:
<mimetype normalized="video/ogg" binary="true" iconPath="video.png">
<mimetypes>
<mimetype>video/ogg</mimetype>
</mimetypes>
<extensions>
<extension>ogv</extension>
</extensions>
</mimetype>