• Resolved sjlongland

    (@sjlongland)


    Hi all,

    A thought with the geojson support. I just tried doing geojson, creating a file using https://geojson.io and then saving the JSON to a file and uploading it.

    Wordpress forbids JSON files, and it seems if the server reports anything but application/json, leaflet refuses to load it. (Or at least it didn’t seem to load it.)

    I wonder if it is practical to store the JSON in the page. Then it can be updated easily without needing to separately upload the file.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bozdoz

    (@bozdoz)

    What do you mean by WordPress forbids JSON files?

    Thread Starter sjlongland

    (@sjlongland)

    Exactly that, it will happily accept JPEGs, PNGs, GIFs, even plain text, but it rejects upload of JSON files as the format has not been whitelisted by WordPress due to oversight or perceived security risk. The message one gets is:

    <b>“test.json” has failed to upload.</b>
    Sorry, this file type is not permitted for security reasons.

    It is possible to modify WordPress to accept JSON files as attachments to posts, however this then requires repeated maintenance each time WordPress is updated and I feel having the ability to handle inline GeoJSON would have far greater utility.

    Plugin Author bozdoz

    (@bozdoz)

    Are you trying to upload json files as media?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Inline geojson?’ is closed to new replies.