How to serve cloudstorage files using app engine SDK

后端 未结 3 1467
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-09 20:55

In app engine I can serve cloudstorage files like a pdf using the default bucket of my application:

http://storage.googleapis.com/.appspot.com/&         


        
3条回答
  •  执笔经年
    2020-12-09 21:56

    UPDATE I found this feature to serve cloudstorage files using the SDK:

    This feature has not been documented yet.

    http://localhost:8080/_ah/gcs/app_default_bucket/filename
    

    This meands we do not need the img serving url to serve NON images as shown below !!!

    To create e serving url for cloudstorage files like images, css, js and pdf's in the default_bucket, I use this code for testing(SDK) and GAE production:

    IMPORTANT: the images.get_serving_url() works also for NON images in the SDK!!

    In the SDK you stll need the blobstore to read a blob and create a serving url for a cloudstorage object.

    I also added the code to read, write and upload cloudstorage blobs in the SDK and GAE production.

    The code can be found here.

提交回复
热议问题