Mike Hines
Mike Hines

Reputation: 13

I uploaded a video to Google Cloud Storage via AppEngine. What's the most efficient way to serve it?

Unlike images, there isn't an API like images.get_serving_url() for serving image blob. For things other than images, should we just set up a download handler and use send_blob() like we would for objects in BlobStorage?

Upvotes: 1

Views: 1062

Answers (2)

Stuart Langley
Stuart Langley

Reputation: 7054

You can ACL your object to public-read and then serve it directly from GCS.

As an example you can have a look at a quick app I wrote to test serving audio and video from GCS and blobstore -> audio-test.appspot.com. This link serves the file using a BlobstoreDownloadHandler while this link serves the same file direct from Google Cloud Storage.

Upvotes: 3

lenik
lenik

Reputation: 23556

AFAIR, you cannot create a serving url for an usual blob in the BlobStore, so the BlobstoreDownloadHandler would be the appropriate solution in your case. Probably the only feasible solution.

Upvotes: 0

Related Questions