From 583a01cf4a834db5e803b7004e5b7bd03284e7b6 Mon Sep 17 00:00:00 2001 From: Clive Blackledge Date: Tue, 20 Feb 2018 18:51:27 +0000 Subject: [PATCH] Added application/vnd.openstreetmap.data+xml type for uploads Closes #151 --- .../mediawiki/templates/default/LocalSettings.php.erb | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.39.5