]> git.openstreetmap.org Git - chef.git/commitdiff
Added application/vnd.openstreetmap.data+xml type for uploads
authorClive Blackledge <cliveb@gmail.com>
Tue, 20 Feb 2018 18:51:27 +0000 (18:51 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 20 Feb 2018 18:51:57 +0000 (18:51 +0000)
Closes #151

cookbooks/mediawiki/templates/default/LocalSettings.php.erb

index b6355c2919986413aac5538c94889f633aa26d9c..dc14397503a09a4d0b28d19097808fdc8c1fc1b3 100644 (file)
@@ -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;