Resolve "Create image upload API for mobile app"
Closes #448 (closed)
What does this MR do?
Adds two endpoints to the REST api for uploading and removing the picture of a basket. The upload uses a simple 'put' request instead of multipart (see Nick's remark in the issue).
How confident are you it won't break things if deployed?
The most important sources of errors are checked in the upload: empty or too large content, invalid image format, wrong mime type. I added some tests that work fine.
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s))