I don’t know of a plugin but you could so this by adding something like:
add_filter('upload_mimes','demo');
function demo($mimes) {
$mimes = array(
'gpx' => 'mime_type_goes_here',
);
return $mimes;
}
to your theme’s functions.php file.
Thread Starter
kaskap
(@kaskap)
where exactly I should paste it?
and how does it works after that?
First, do you know the mime type for .gpx files?
Thread Starter
kaskap
(@kaskap)
no, sorry, I don’t really know what is the mime type, I’m lame… 🙂
According to Google, you should try application/gpx+xml
or text/xml
So try adding:
add_filter('upload_mimes','demo');
function demo($mimes) {
$mimes = array(
'gpx' => 'text/xml',
);
return $mimes;
}
to your theme’s function.php file – anywhere between the opening <?php
and the closing ?>
tags (or the end of the file). You should find that you’re then able to upload & insert .gpx files. If you still have problems uploading, you might have to contact your hosts to check that they will allow these files on their servers.
Thread Starter
kaskap
(@kaskap)
Thanks for your help, but it doesn’t works, when I put this line I’ve got an php error.
But I finally found correct plugin, it calls GPS Track On Google Maps 🙂
so the problem is solved!