From: Clive Blackledge Date: Tue, 20 Feb 2018 18:51:27 +0000 (+0000) Subject: Added application/vnd.openstreetmap.data+xml type for uploads X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/583a01cf4a834db5e803b7004e5b7bd03284e7b6?hp=5d5f0eab4047b150ee149aefe6f92d1c0ea9cc83 Added application/vnd.openstreetmap.data+xml type for uploads Closes #151 --- diff --git a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb index b6355c291..dc1439750 100644 --- a/cookbooks/mediawiki/templates/default/LocalSettings.php.erb +++ b/cookbooks/mediawiki/templates/default/LocalSettings.php.erb @@ -98,6 +98,14 @@ $wgFileExtensions[] = 'osm'; $wgFileExtensions[] = '<%= mw_extra_file_extension %>'; <% end -%> +# Add OSM XML file format per http://www.iana.org/assignments/media-types/media-types.xhtml +# Shout out to Paul Norman for reserving this. +# Helps MimeMagic determine XML-based formats and chooses the correct MimeType +# for .osm files. +$wgXMLMimeTypes[] = array('osm' => 'application/vnd.openstreetmap.data+xml'); + +$wgTrustedMediaFormats[] = 'application/vnd.openstreetmap.data+xml'; + $wgSVGConverters = array( 'rsvg' => '/usr/bin/rsvg-convert -w $width -h $height -o $output $input'); $wgSVGConverter = 'rsvg'; $wgSVGMaxSize = 2000;