wavded / ogre

ogr2ogr geojson-focused web client
http://ogre.adc4gis.com
MIT License
266 stars 79 forks source link

Request Entity Too Large #34

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hi :)

As part of my app, I convert GeoJson files into Shapefiles. The tool worked great before v0.8.0, but it is giving me this error message after and including v0.8.0: {"error":true,"msg":"request entity too large"}

The json file itself is quite large but it used to convert successfully. Any ideas why this issue might be happening?

Thanks!

wavded commented 10 years ago

The body-parser middleware I believe added some limits that weren't there before which would explain the issue. I imagine you have quite the JSON payload :) That is configurable and we can bump it. Do you have any idea how many bytes you are sending up?

ghost commented 10 years ago

Ahh I see. The json files are at most 3MB I believe. Where can I configure this limit?

ghost commented 10 years ago

Nevermind I got it. I changed a line in index.js from app.use(urlencoded({ extended: false })) to app.use(urlencoded({ extended: false, limit:3000000 })) //3MB and that resolved the issue. Thanks for the lead :)

wavded commented 10 years ago

Glad you got it working!