How do I get the serving URL for Google Cloud Storage file objects on App Engine dev server?

Viewed 4563

I have a python App Engine app and save files using the Google Cloud Storage API. However I need to get the serving URL for each file.

On production it is easy to figure out what the serving URL is as I prepend http://commondatastorage.googleapis.com to /bucket/path/to/file.txt as I already have the bucket name and path to my file.

How do I figure out what the serving URL is on the dev server?

It seems straight forward enough to do this with images using images.get_serving_url which can now take either blobstore or Cloud Storage references.

How can I figure out the serving URL for all files, not just images in a way that is compatible with both the development and production App Engine environments?

1 Answers
Related