• Resolved andrewpaulbowden

    (@andrewpaulbowden)


    Hi – I’m after some advice if anyone is able to give it.

    I’m in the process of importing a site from Movable Type. The old site has a number of GPX files available for download.

    I have set WordPress up to allow GPX files to be uploaded by adding to my functions.php, the following code :

    add_filter('upload_mimes', 'custom_upload_mimes');
    function custom_upload_mimes ( $existing_mimes=array() ) {
    
    $existing_mimes['gpx'] = array('text/xml');
    
    return $existing_mimes;
    }

    This is good and allows GPX files to be uploaded.

    However on attempted viewing of the GPX file, I just get a blank screen.

    If I rename the file to be .txt or .xml, it is displayed as you would expect. However to do this would be a bit of a hack – I’d much rather serve GPX files. Is anyone able to tell me what I’m missing? Unfortunately Google searching this is very difficult!

    Many thanks

Viewing 1 replies (of 1 total)
  • Thread Starter andrewpaulbowden

    (@andrewpaulbowden)

    OK, this seems to actually be an Apache related issue. The solution was to put

    AddType application/xml .gpx

    in my server config/

Viewing 1 replies (of 1 total)
  • The topic ‘Blank screen when viewing GPX file’ is closed to new replies.