Good replacement for Blobstore.send to send out cloud storage files?

27 views
Skip to first unread message

Jens-Uwe Mager

unread,
Oct 2, 2019, 3:15:30 PM10/2/19
to google-appengine-go
I am using the technique in one of my 1.9 appengines to send out some conditional content based on some other program logic. Basically a file is created about every hour in cloud storage by a cron job worker, and clients can ask for the current one or up 7 days worth of old files by using some parameters on the request. The old 1.9 code used the feature of the old runtime blobstore.BlobKeyForFile and blobstore.Send() to select the particular file of interest and set appropriate Expires/ETag headers on the file and do some If-Modified-Since handling to make the caching work nice.

This way I did not need to read the cloud storage file from the bucket myself, I could just direct the frontend to serve the file I did select. But now with the newer runtimes this function appears to have vanished, so I have to make the files of interest public readable in cloud storage and redirect the clients to the file. But this also causes one additional roundtrip on the client side to follow the redirect, which is inefficient.

Is there some way to access this feature from the newer runtimes? Any ideas?

Reply all
Reply to author
Forward
0 new messages