orma / openroads-api

The OpenRoads API
0 stars 0 forks source link

Payload limit on /upload #76

Open olafveerman opened 9 years ago

olafveerman commented 9 years ago

When uploading a 35mb changeset using:

curl -d @Palawan_Roads.osm http://openroads-api.herokuapp.com/upload

the server returns:

{"statusCode":400,"error":"Bad Request","message":"Payload content length greater than maximum allowed: 1048576"}

cc @dereklieu @kamicut @anandthakker @danielfdsilva

olafveerman commented 9 years ago

It is possible to upload a changeset smaller than 1mb, even though the following message is returned:

$ curl -d @Palawan_Roads3.osm https://openroads-api.herokuapp.com/upload

<!DOCTYPE html>
    <html>
    <head>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <style type="text/css">
        html, body, iframe { margin: 0; padding: 0; height: 100%; }
        iframe { display: block; width: 100%; border: none; }
      </style>
    <title>Application Error</title>
    </head>
    <body>
      <iframe src="//s3.amazonaws.com/heroku_pages/error.html">
        <p>Application Error</p>
      </iframe>
    </body>
    </html>
olafveerman commented 9 years ago

@danielfdsilva Do I correctly recall that you had some issues setting up Hapi to work with larger file sizes before?

danielfdsilva commented 9 years ago

@olafveerman I don't remember exactly how it was done, but changing the maximum allowed payload is easy. The problem I had was parsing huge files, but just because it would take too long.