Blaine Garrett
Blaine Garrett

Reputation: 1366

URL to Cloudstorage file on sdk

I am experimenting with Google Cloud Storage on Appengine. I installed the new cloudstorage python api code and have everything working well. I deployed my code, and it is also working well.

My ACL is (correctly) set to public-read and I can view my added files on http://commondatastorage.googleapis.com// just fine when calling cloudstorage on the appspot.

However, is there a similar path on the local sdk?

I am using this to upload images and create thumbnails. However, locally, I don't know how to serve up the url to the thumbnail. I do see in the blobstore viewer, the blobs are created, but there is no filename displyed in the blobinfo AND the url uses the blobstore key rather than the filename I gave to the gs create call.

Upvotes: 2

Views: 153

Answers (1)

Ezequiel Muns
Ezequiel Muns

Reputation: 7742

Yes, you can use the following on the app server:

/_ah/gcs/[bucket name]/[filename]

If you used the default bucket, it's called app_default_bucket.

I've tested it with images and it works well. With mp4 videos it seems to run into an error though.

Upvotes: 1

Related Questions