You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@archiva.apache.org by Per Arnold Blaasmo <pe...@atmel.com> on 2014/01/21 12:46:43 UTC

Adding Mime type

Hi,
I need to add a mime type wondered if I need to do that in the code
under webdav/utils/mime.types or if I can add it as a config option
somewhere?
I tried to add it to the tom cat web.xml files which have mime-types for
tomcat, but that did not work.

Or maybe I can configure archive to use my own mime-types file?

Regards
Per A.

-- 
Per Arnold Blåsmo
Senior Design Engineer, Atmel Norway


Re: Adding Mime type

Posted by Per Arnold Blaasmo <pe...@atmel.com>.
On 22. jan. 2014 14:12, Per Arnold Blaasmo wrote:
> On 22. jan. 2014 13:09, Olivier Lamy wrote:
>> On 21 January 2014 22:46, Per Arnold Blaasmo
>> <pe...@atmel.com> wrote:
>>> Hi,
>>> I need to add a mime type wondered if I need to do that in the code
>>> under webdav/utils/mime.types or if I can add it as a config option
>>> somewhere?
>>> I tried to add it to the tom cat web.xml files which have mime-types for
>>> tomcat, but that did not work.
>>>
>>> Or maybe I can configure archive to use my own mime-types file?
>>
>> In the webapp there is a file WEB-INF/applicationContext.xml
>>
>> with the commented
>>
>>   <!--
>>   <bean name="mimeTpes" class="org.apache.archiva.webdav.util.MimeTypes">
>>     <property name="resource" value="archiva-mime-types.txt"/>
>>   </bean>
>>   -->
>>
>> So you can uncomment an use your own file.
>> Copy the original
>> (http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/resources/org/apache/archiva/webdav/util/mime.types
>> ) to WEB-INF/classes/archiva-mime-types.txt and your line.
>>
> 
> Elegant solution :-)
> Thanks!
> 
>> I believe we could improve that. Please create an issue
> Will do!

Added as issue https://jira.codehaus.org/browse/MRM-1799

Per A.


Re: Adding Mime type

Posted by Per Arnold Blaasmo <pe...@atmel.com>.
On 22. jan. 2014 13:09, Olivier Lamy wrote:
> On 21 January 2014 22:46, Per Arnold Blaasmo
> <pe...@atmel.com> wrote:
>> Hi,
>> I need to add a mime type wondered if I need to do that in the code
>> under webdav/utils/mime.types or if I can add it as a config option
>> somewhere?
>> I tried to add it to the tom cat web.xml files which have mime-types for
>> tomcat, but that did not work.
>>
>> Or maybe I can configure archive to use my own mime-types file?
> 
> In the webapp there is a file WEB-INF/applicationContext.xml
> 
> with the commented
> 
>   <!--
>   <bean name="mimeTpes" class="org.apache.archiva.webdav.util.MimeTypes">
>     <property name="resource" value="archiva-mime-types.txt"/>
>   </bean>
>   -->
> 
> So you can uncomment an use your own file.
> Copy the original
> (http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/resources/org/apache/archiva/webdav/util/mime.types
> ) to WEB-INF/classes/archiva-mime-types.txt and your line.
> 

Elegant solution :-)
Thanks!

> I believe we could improve that. Please create an issue
Will do!

Per A.


Re: Adding Mime type

Posted by Olivier Lamy <ol...@apache.org>.
On 21 January 2014 22:46, Per Arnold Blaasmo
<pe...@atmel.com> wrote:
> Hi,
> I need to add a mime type wondered if I need to do that in the code
> under webdav/utils/mime.types or if I can add it as a config option
> somewhere?
> I tried to add it to the tom cat web.xml files which have mime-types for
> tomcat, but that did not work.
>
> Or maybe I can configure archive to use my own mime-types file?

In the webapp there is a file WEB-INF/applicationContext.xml

with the commented

  <!--
  <bean name="mimeTpes" class="org.apache.archiva.webdav.util.MimeTypes">
    <property name="resource" value="archiva-mime-types.txt"/>
  </bean>
  -->

So you can uncomment an use your own file.
Copy the original
(http://svn.apache.org/repos/asf/archiva/trunk/archiva-modules/archiva-web/archiva-webdav/src/main/resources/org/apache/archiva/webdav/util/mime.types
) to WEB-INF/classes/archiva-mime-types.txt and your line.

I believe we could improve that. Please create an issue

Thanks
Olivier




>
> Regards
> Per A.
>
> --
> Per Arnold Blåsmo
> Senior Design Engineer, Atmel Norway
>



-- 
Olivier Lamy
Ecetera: http://ecetera.com.au
http://twitter.com/olamy | http://linkedin.com/in/olamy