I am looking at switching from Blobstore to Google Cloud Storage for things like image uploads in a project (since Google calls Blobstore "superseded").
In Blobstore, the multipart form would be submitted (uploaded) directly to the Blobstore, which would then rewrite the request and redirect to the GAE app for handling the BlobKey
(s). This meant very little load on the GAE app.
Is there a way to implement a similar workflow with Google Cloud Storage (GCS)?
The example given at Reading and Writing to Google Cloud Storage involves GAE code handling the upload, reading the data and saving it in GCS.
Similarly for serving the (for example) uploaded image file: seems like a handler has to be implemented in one's GAE code to read from GCS and return the image data.
Isn't there a way to simply generate a URL for a resource in GCS (AFAIK AWS S3 supports this) and let it be served from there?
Google Cloud Storage does support generating URL for upload or reads. For more information see: https://cloud.google.com/storage/docs/access-control/create-signed-urls-program
The gcloud-java-storage library can help with creating such signed URL.
You can keep using the blobstore API but with actual storage in GCS, meaning same upload behaviour and probably minimal changes to your app.
From Using the Blobstore API with Google Cloud Storage (Python):
A complete example app is presented there as well.
Update: Oops, the above answer applies to the Python environment, the Java one follows:
From Using the Blobstore API with Google Cloud Storage (Java):
There is no complete sample app for Java, tho.