WordPress.org

Ready to get started?Download WordPress

Forums

Delightful Downloads
[resolved] GPX download being served up as .htm via DD (4 posts)

  1. AdventureRidingNZ
    Member
    Posted 5 months ago #

    I'm retrofitting Delightful Downloads to my site that already has 80 .GPX files available for download. The files were all uploaded using 'WP-GPX Maps' reside in /wp-content/uploads/gpx/ directory and currently download fine via text links in the page content.

    Using Delightful Downloads I am obviously wanting to manage downloads to registered users only. I have added all the files to DD and generated shortcodes for them all and placed download buttons on the page, however when the download button is clicked the files are served up as a .htm file, not .gpx.

    I presume I am missing a file/mime type setting somewhere, but I have no idea where. When I installed WP-GPS maps I had to add .GPX as a MIME type to the IIS server, so I know it's setup there.

    Site: http://www.adventureridingnz.co.nz
    Sample page with existing text link: http://www.adventureridingnz.co.nz/gps-tracks-rides/north-island-tracks/north-range-road/
    Sample page with DD button: http://www.adventureridingnz.co.nz/gps-tracks-rides/north-island-tracks/wharite-peak/

    Can you offer any advice?

    Thanks
    Eddie

    https://wordpress.org/plugins/delightful-downloads/

  2. A5hleyRich
    Member
    Plugin Author

    Posted 5 months ago #

    Hi Eddie,

    Delightful Downloads uses the default WordPress mime types. You will therefore need to make WordPress aware of the mime and extension. Please follow this tutorial on how to add additional file types.

    If you have any further issues let me know.

    Ashley

  3. AdventureRidingNZ
    Member
    Posted 5 months ago #

    Thanks very much Ashley.

    I created a functions.php in my child theme and used that tutorial with the mimetype set as below and it's working great.

    'gpx' => 'application/gpx+xml'

    Thanks for the quick response.

  4. A5hleyRich
    Member
    Plugin Author

    Posted 5 months ago #

    Glad to help and thanks for the review.

    Ashley

Reply

You must log in to post.

About this Plugin

About this Topic