<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to change &amp;quot;Content-Type&amp;quot; of static resource files in WebEngine in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327663#M14664</link>
    <description>&lt;P&gt;I [add the line on the trunk][1] of Nuxeo, but I need to wait to add it into the first Hot Fix package as the release is in progress.&lt;/P&gt;</description>
    <pubDate>Thu, 30 Aug 2012 13:35:10 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2012-08-30T13:35:10Z</dc:date>
    <item>
      <title>How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327659#M14660</link>
      <description>&lt;P&gt;The files below "skin/resources/".
(as said by &lt;A href="http://doc.nuxeo.com/display/NXDOC/WebEngine+%28JAX-RS%29#WebEngine%28JAX-RS%29-Staticresources"&gt;http://doc.nuxeo.com/display/NXDOC/WebEngine+%28JAX-RS%29#WebEngine%28JAX-RS%29-Staticresources&lt;/A&gt;)
File is found, but with bad mimetype "text/plain" instead of "video/ogg":&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;    oe@charlie:~$ wget -S &lt;A href="http://marcie:8080/nuxeo/site/portal/skin/images/demomedia/intro.ogv" target="test_blank"&gt;http://marcie:8080/nuxeo/site/portal/skin/images/demomedia/intro.ogv&lt;/A&gt;
--2012-08-24 12:45:01--  &lt;A href="http://marcie:8080/nuxeo/site/portal/skin/images/demomedia/intro.ogv" target="test_blank"&gt;http://marcie:8080/nuxeo/site/portal/skin/images/demomedia/intro.ogv&lt;/A&gt;
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]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I succssfully can change the mime-type for the &lt;EM&gt;non-WebEngine&lt;/EM&gt; public directory (below nxserver\nuxeo.war), I guess, these files are almost &lt;EM&gt;untoched&lt;/EM&gt; by nuxeo, hence the tomcat way works: in file deployment-fragment.xml add:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;extension target="web#SERVLET"&amp;gt;
	&amp;lt;mime-mapping&amp;gt;
		&amp;lt;extension&amp;gt;ogv&amp;lt;/extension&amp;gt;
		&amp;lt;mime-type&amp;gt;video/ogg&amp;lt;/mime-type&amp;gt;
	&amp;lt;/mime-mapping&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;now it works for the file &lt;A href="http://localhost:8080/nuxeo/portal/intro.ogv" target="test_blank"&gt;http://localhost:8080/nuxeo/portal/intro.ogv&lt;/A&gt; (notice the missing "site/").&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;    oe@charlie:~$ wget -S &lt;A href="http://marcie:8080/nuxeo/portal/intro.ogv" target="test_blank"&gt;http://marcie:8080/nuxeo/portal/intro.ogv&lt;/A&gt;
--2012-08-24 12:46:21--  &lt;A href="http://marcie:8080/nuxeo/portal/intro.ogv" target="test_blank"&gt;http://marcie:8080/nuxeo/portal/intro.ogv&lt;/A&gt;
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]
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How to change it for WebEngine? I guessed an extenstion point, but the one I found
&lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.6-RC3/viewComponent/org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService/"&gt;http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.6-RC3/viewComponent/org.nuxeo.ecm.platform.mimetype.service.MimetypeRegistryService/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;has it already set:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;mimetype normalized="video/ogg" binary="true" iconPath="video.png"&amp;gt;
  &amp;lt;mimetypes&amp;gt;
    &amp;lt;mimetype&amp;gt;video/ogg&amp;lt;/mimetype&amp;gt;
  &amp;lt;/mimetypes&amp;gt;
  &amp;lt;extensions&amp;gt;
    &amp;lt;extension&amp;gt;ogv&amp;lt;/extension&amp;gt;
  &amp;lt;/extensions&amp;gt;
&amp;lt;/mimetype&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:50:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327659#M14660</guid>
      <dc:creator>erdmann_</dc:creator>
      <dc:date>2012-08-24T12:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327660#M14661</link>
      <description>&lt;P&gt;Did you try with renaming your file to *.ogg, I think the mime type exposed will be application/ogg. I'm not a specialist but I think it may work.&lt;/P&gt;
&lt;P&gt;Any way I think one way to add this mimetype is to add it in our nuxeo-webengine-core project this mimetype in the OSGI-INF/mimetype.properties.&lt;/P&gt;
&lt;P&gt;I wait your feedback on the first point&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2012 11:53:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327660#M14661</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-08-28T11:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327661#M14662</link>
      <description>&lt;P&gt;Thanks for the hint.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 12:11:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327661#M14662</guid>
      <dc:creator>erdmann_</dc:creator>
      <dc:date>2012-08-30T12:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327662#M14663</link>
      <description>&lt;P&gt;Thanks for your feedback, and please use answers for answers and comment for comment. This is important for the readability of this website. Other users that will read your question will acces the real answers easily. Also mark my answer as the one that has work for you.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:22:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327662#M14663</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-08-30T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327663#M14664</link>
      <description>&lt;P&gt;I [add the line on the trunk][1] of Nuxeo, but I need to wait to add it into the first Hot Fix package as the release is in progress.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Aug 2012 13:35:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327663#M14664</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-08-30T13:35:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327664#M14665</link>
      <description>&lt;P&gt;If its still in progress, the same for &lt;EM&gt;audio&lt;/EM&gt; would be nice and in accordance with the RFC http&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2012 16:29:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327664#M14665</guid>
      <dc:creator>erdmann_</dc:creator>
      <dc:date>2012-08-31T16:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to change "Content-Type" of static resource files in WebEngine</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327665#M14666</link>
      <description>&lt;P&gt;Ok I add [it][1]. Backport for 5.6 and 5.5 available soon.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2012 11:54:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-to-change-quot-content-type-quot-of-static-resource-files-in/m-p/327665#M14666</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-09-03T11:54:11Z</dc:date>
    </item>
  </channel>
</rss>

