• Resolved adriancostarica1

    (@adriancostarica1)


    Hello Joe. Great plugin.!! I have a Garmin Montana GPS. I tried Waymak to upload a track as seen on your video but it is not possible. Somethings about the plugin work but other don not. Not uploading .GPX or .KLM files is my mayor concern. But I was able to create a map short code and added to my web site together with a picture.
    Am I doing something wrong? Anything I must set up?
    Thanks,
    Adrian

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Joe

    (@morehawes)

    Hi Adrian,

    Thanks for reaching out, I’m sorry to hear you are having issues importing files. Are you seeing any console errors when you try to upload the file? If so, please can you provide them.

    If you could also provide a link to a sample file that is causing this behavior that would be a big help.

    Thanks,

    Joe

    Thread Starter adriancostarica1

    (@adriancostarica1)

    Hola Joe,
    Thanks a lot for your quick reply.
    Bear in mind that English is not my native language. Please be patient :).

    No console errors (I checked your link).
    The only error message I was receiving was something like “sorry, this file type is not permitted for security reasons”. Such message (error) was solved by using a plugin called “WP ADD MIME TyPES”. With this plugin I included the .gpx file extension and it did work for other plugins but made no difference in Waymark.

    I am giving you a couple of links to my web site (the one that I am trying to build). I made a couple of changes that my be useful for this topic.

    https://adriancostarica.com/my-cool-map/
    https://adriancostarica.com/prueba-mapa/

    The firts link has the GPX file that I can not upload to Waymark.
    The second one is a trail map made with LF Hiker plugin.

    I hope this helps.

    If there is anything else I can do please let me know.

    Thanks again

    Plugin Author Joe

    (@morehawes)

    Hi Adrian,

    Just to confirm, when editing a Map and you try to upload the GPX file you do not see any console errors… nothing happens?

    I was able to successfully import the file you provided, so it does appear to be that your WordPress install is blocking the filetype from being uploaded as you suggested.

    It is very strange that the plugin removed this error, but did not solve the problem. I believe that the following is the correct input for file extensions/MIMI types used by Waymark for the plugin you mentioned:

    gpx=application/gpx+xml
    kml=application/vnd.google-earth.kml+xml
    kmz=application/vnd.google-earth.kmz
    json=application/geo+json
    geojson=application/geo+json

    Are you using WordPress multisite? If so please try this instead. You might also have better luck with a different plugin such as this one.

    Another option would be to allow all file type uploads (i.e. bypassing this security feature) for administrators by adding this line to your wp-config.php file:

    define( 'ALLOW_UNFILTERED_UPLOADS', true );

    …but this should be seen as a last resort.

    I hope this helps. If not we can try to dig deeper to find what is causing the upload to be blocked.

    Cheers,

    Joe

    Thread Starter adriancostarica1

    (@adriancostarica1)

    Hola Joe.

    Nothing happens!!. That is correct. No messages or warnings.

    I removed all other plugins, even Waymark, then reinstalled. Nothing!!

    The file extensions/MIMI you send me were exactly as the ones I imputed.

    I agree with you that It could be my WordPress install.

    The last resource you mentioned I will not use. I do not feel confident, not enough experience.

    Remember that parts of the plugin DO WORK other do not. If you were able to open the file I send you then the problem is on my side. I am planning to reset everything next week and re-install to start over. If anything positive happens I will let you know.

    Thanks a lot for your help.

    Regards,

    Plugin Author Joe

    (@morehawes)

    The last resource you mentioned I will not use. I do not feel confident, not enough experience.

    Understandable and a wise approach. If you feel more confident in the future this could be something to test temporarily, as it may help diagnose the problem. Also worth noting that this setting only applies for logged in users with administration privileges.

    I removed all other plugins, even Waymark, then reinstalled. Nothing!!

    Very strange. This does hint at it being something to do with how your environment is configured.

    I am planning to reset everything next week and re-install to start over. If anything positive happens I will let you know.

    Please do let me know either way, as I am interested in figuring out what I can do to improve Waymark so this does not happen for others.

    Good luck!

    Joe

    Hello,

    have you checked this:

    https://premium.wpmudev.org/blog/how-to-change-the-allowed-file-upload-types-in-wordpress-multisite/

    file extensions are case sensitive!

    Andreas

    Plugin Author Joe

    (@morehawes)

    Hi @adriancostarica1,

    Just curious if you ever made any progress on this?

    Cheers,

    Joe

    Plugin Author Joe

    (@morehawes)

    I believe this has been fixed in version 0.9.14 of the plugin. Marking as resolved ??

    Cheers,

    Joe

    My Mac identifies gpx files as gpsxml. I couldn’t get uploads to work with any of the published mime types until I tried gpsxml which worked.

    Add this to functions.php (there’s a lot of variations to cover other eventualities):

    function custom_mime_types( $mimes ) { 
    // Add new MIME types here
    $mimes['kml'] = 'application/vnd.google-earth.kml+xml';
    $mimes['gpx'] = 'application/gpx+xml';
    $mimes['gpx'] = 'application/xml';
    $mimes['gpx'] = 'text/xml';
    $mimes['gpx'] = 'text/gpx';
    $mimes['gpx'] = 'text/gpsxml';
    $mimes['gpx'] = 'application/gpsxml';
    
    return $mimes;
    }
    add_filter( 'upload_mimes', 'custom_mime_types' );
    Plugin Author Joe

    (@morehawes)

    Thanks for sharing. I’m not seeing any references to application/gpsxml on the internet, so it does not appear to be a valid MIME type. I’m using Mac too, so I don’t think the issue is there.

    I’m curious if you know which application might have set this MIME type for the file in question?

    Cheers,

    Joe

    Who knows? When ‘get info’ on a gpx file on my mac it shows KIND:gpsxml so on an offchance I set that. And instantly I could upload the gpx after all the other mime types failed.
    I use a Garmin Forerunner, and Garmin Ant agent downloads the gpx in the form of .FIT (some kind of DB file) and .TCX (TCXXML) files. I import into an ancient logging/mapping program (I presume it uses the TCX) and if I export a gpx file from it, it produces the gpsxml file type.

    So it’s not supposed to be like that but it works. It might be quite an unusual solution but it seems a lot of people have trouble uploading gpx files so it’s worth looking at what the computer thinks the file type is.

    The ancient application in question is Ascent.

    Plugin Author Joe

    (@morehawes)

    Thanks for the extra detail, I’m sure others will find this helpful ??

    Cheers,

    Joe

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Not able to Upload GPX file’ is closed to new replies.