Sending Images As A Base64 String To A Google Cloud Endpoint From Cms
I am trying to send an image from my cms to my Google Cloud Endpoint to be stored in the Google Datastore. The image is converted into a base64 string then send to the endpoint. It
Solution 1:
I believe (but can't be sure, because there is not enough information) that there is a bug in API config generation. Text isn't allowed as a resource in Endpoints. Resources always must be JSON objects, not primitives. So I suggest making a class Request { Blob image; }
(expand to be standard Java as you like) and then you shouldn't need to create a new Blob
. Then change the resource to take the Request type:
@ApiMethod(name = "storeItemFromJs", path="itembean/store/js")
public Entity storeItemFromJs(..., Request request)
Post a Comment for "Sending Images As A Base64 String To A Google Cloud Endpoint From Cms"