Thanks in advance for any help. I am working with a web service that uses only json data, and this service is configured to send photos.
So, I'm trying to figure out how to correctly insert an image into the json payload. This is my approach.
everything works and I get the json payload. Note: the bas64 string falls into the body of the message.
Does anyone know about using this approach if the URI needs to be embedded in front of the data - something like this: "file": "data: image / jpg; base64, [base64 string]" - I tried this, but didn't get love from a web service, but I may have the wrong syntax.
however, the web service does not like this.
To check the encoding, I cut the generated string from nslog and pasted it into the website of the online decoder, and it again creates the original image, so it looks like the data was encoded correctly.
In a couple of days, before I can talk to the web server administrator, I am just looking for verification that this is the right approach or point out any shortcomings. I canβt change the service to a multi-part encoded form, I follow this approach.
thanks again
source share