We've been spinning our wheels at little bit on this problem and wondered if anyone had any ideas.
We are trying to create a REST endpoint which will accept an image (base64 or binary) as a POST, but we have drawn blanks on how to achieve it.
The images that are being uploaded from a mobile client are around 40Kb and have been happily converted to base64 (our original idea) and POSTed to a REST service. The problem we encountered is the HTTP Header didn't allow more than 30k characters (thinking the HTTP Header has some upper limit here but not sure), but when we switched to putting the characters in the body as JSON (with a few extra attributes) it falls over as each item in JSON also needs to be under the 32k character limit or it throws an error.
We have tried accessing the content using :body but this always returns blank.
Could we use a multipart form to do the same job? We've been looking for a while on the best approach but seem to be drawing a blank.
Any ideas or pointers would be gratefully received.
Have you checked out this piece of documentation? The example it uses uploads images, which is exactly what you are trying to do. It may not apply, but let us know if it does not.
Hope this helps.
- Rick Greenwald