Saving blobs with Google Endpoint

做~自己de王妃 提交于 2019-12-05 14:25:32

I see two questions in one here :

  1. Can Google Cloud Endpoints handle multipart files ? -> I don't know about this TBH

  2. Is there a simpler process to store blobs than using the BlobStoreService?

It depends on the size of your image. If you limit your users to < 1MB files, you could just store your image as a Blob property of your Animal entity. It would allow you to bypass the BlobStoreService plumbering. See : https://developers.google.com/appengine/docs/java/datastore/entities?hl=FR

This solution still depends on how the Cloud Endpoint would handle the multipart file as a raw byte[]...

We encountered the same issue with GWT + Google App Engine in 2009, and it was before the BlobStoreService was made available.

GWT RPC and Cloud Endpoints interfaces share some similarities, and for us it was not possible. We had to create a plain HTTP Servlet, and use a Streaming Multipart file resolver beacause the one from Apache's HTTP Commons used the file system.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!