Title: Inline geojson?
Last modified: December 24, 2016

---

# Inline geojson?

 *  Resolved [sjlongland](https://wordpress.org/support/users/sjlongland/)
 * (@sjlongland)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/inline-geojson/)
 * Hi all,
 * A thought with the geojson support. I just tried doing geojson, creating a file
   using [http://geojson.io](http://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](https://wordpress.org/support/users/bozdoz/)
 * (@bozdoz)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/inline-geojson/#post-8592194)
 * What do you mean by WordPress forbids JSON files?
 *  Thread Starter [sjlongland](https://wordpress.org/support/users/sjlongland/)
 * (@sjlongland)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/inline-geojson/#post-8605237)
 * 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](https://wordpress.org/support/users/bozdoz/)
 * (@bozdoz)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/inline-geojson/#post-8606302)
 * 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.

 * ![](https://ps.w.org/leaflet-map/assets/icon-256x256.png?rev=1693083)
 * [Leaflet Map](https://wordpress.org/plugins/leaflet-map/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/leaflet-map/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/leaflet-map/)
 * [Active Topics](https://wordpress.org/support/plugin/leaflet-map/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/leaflet-map/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/leaflet-map/reviews/)

## Tags

 * [geoJSON](https://wordpress.org/support/topic-tag/geojson/)

 * 3 replies
 * 2 participants
 * Last reply from: [bozdoz](https://wordpress.org/support/users/bozdoz/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/inline-geojson/#post-8606302)
 * Status: resolved