Closed rYR79435 closed 2 years ago
I figured out what the problem was. The API expects the file to be named 'json'.
I did so via this line in the MR frontend: https://github.com/osmlab/maproulette3/blob/e785c0e49af2b0bfcd9ffadbcbb199da6cca2ee5/src/services/Challenge/Challenge.js#L1020
Sure thing! Thank you for reviewing.
This is my shot at implementing the endpoint I requested in #83.
I have used the swagger documentation for this.
Unfortuantely the API always returns
maproulette.api.errors.InvalidJsonError: {'status': 400, 'message': 'Invalid JSON payload.'}
no matter what I try. I have depleted my ideas for how to fix this, hence I'm creating this draft in hopes someone can help me.Some notes:
Edit Challenge -> Change Name or Data Source -> upload GeoJSON file
), it works with no problems whatsoever (no errors, I can start tasks and they work as expected).Missing boundary header
error. This is also true for curl on my local machine. I receive the same error whether I use the afforementioned JSON (that works in MR UI) or some (valid as well as invalid JSON) bogus data.Here's a gist with example data: https://gist.github.com/rYR79435/08f2835ae1876c1e8c5ed8968cce208e