I managed to upload the blob from Javascript to Java Endpointfunction
Javascript
var request = gapi.client.helloworldendpoints.uploadImage({
'imageData': __upload.imageData,
'fileName': __upload.fileName,
'mimeType': __upload.mimeType,
'size': __upload.size
});
Java Endpoint
public ImageUploadRequest uploadImage(
Request imageData,
@Named("fileName") String fileName,
@Named("mimeType") String mimeType,
@Named("size") float size
) { ... }
Request is just this
public class Request {
public Blob image;
}
Now i want to send a MultipartRequest from my Java Endpoint at GAE to my UploadServlet to create a blobkey and save the data into blobstorage, since Blobstorage only accepts data send to servlet. How can I create a MultipartRequest?