Site logo

Archived topic

Upload GPX files with snippet...

3 replies · Started by Ian on June 13, 2020

Viewing posts 1–4 of 4

Hello
I am trying to upload GPX files to the media file.
However, I am getting the usual error message.
I have (with other websites) managed, with the use of a PHP Snippet (in the Snippet plugin) to upload GPX files.
But... for some reason, it is not working now.
I have tried various combinations of meme types including the snippet below.

function my_myme_types($mime_types){
$mime_types['gpx'] = 'gpx = application/gpx+xml'; //Adding gpx file
$mime_types['gpx'] = 'gpx = application/gpx,xml'; //Adding gpx file
$mime_types['gpx'] = 'gpx = application/gpx'; //Adding gpx file
$mime_types['gpx'] = 'gpx = application/text+xml'; //Adding gpx file
return $mime_types;
}
add_filter('upload_mimes', 'my_myme_types', 1, 1);

Any help would be fantastic.
Thank you
Ian

Hi there,

This shouldn't be theme related as GP doesn't control the media library.

We don't have any experience in this either.

I would recommend posting your question in a site like this and see if anyone has experience:
https://wordpress.stackexchange.com/

Thank you
Got it sorted
Ian

Glad you did!

This archived topic is closed to new replies.