2
votes

I want to create a rest endpoint using which I can upload multi part data i.e images and text etc to Google cloud storage. I have a code which can store a byte Array to file in Google cloud storage but I could configure my endpoint.

After looking at the Google app engine Java sdk docs, I found several @named parameters like int, string etc but could not find File parameter which can be used to upload multi part data.

So my exact question, whether I can create an API endpoints by @API annotations using which I can directly process my multi part data or not?

1
please ask specific code related problem and follow the tutorial stackoverflow.com/help/how-to-ask - SkyWalker

1 Answers

0
votes

Actually GAE provides several ways to store binary data:

  1. You can use the Blob field type (com.google.appengine.api.datastore.Blob) to store Byte string up to 1 megabyte.
  2. Google Cloud Storage is useful for storing and serving large files.
  3. The Blobstore API allows your application to serve data objects, called blobs, that are much larger than the size allowed for objects in the Datastore service. Blobs are useful for serving large files, such as video or image files, and for allowing users to upload large data files. You can still keep reference in the datastore to the blob using the Blobstore key field type (com.google.appengine.api.blobstore.BlobKey).

You also may consider to use a Java application framework like Jello Framework that using GAE Blobstore and provide RESTful API to upload/download attachments.