Moreover it is possible that they expect JSON-Base64 (without saying it).
Then instead of urlencoding the base64 code the following should work.
put base64Encode(myImg) into tImage64
replace numToChar(10) with empty in tImage64 -- doesn't harm
replace "+" with "-" in tImage64
replace "/" with "_"
Because "+/=" is possibly in the encoded data:
Did you already try the following?
put urlEncode(base64encode(myImg)) into tImage64
put quote& "data:image/jpg;base64," & tImage64 "e into myContent
post ... "content": & myContent ...
The image size will increase by a factor of 3 to 4 using base64.
Thanks. I might not have done it correctly, but neither 1 nor 2 made a
noticeable difference.
I am a little confused by this. I tried copying out the base64 data to put
it into a different API testing app and it looks way too short. I'm not
familiar with how much text it takes to describe an image
You could try two things after "put base64encode(tImage) into tImage64":
replace newlines in the encodedData and give a data-header.
Both is needed when setting HTML5 attributes, may be also in your case.
[1] replace numToChar(10) with empty in tImage64
[2] "content": "data:image/png;base64," & tI