<small id='iyHbz'></small><noframes id='iyHbz'>

      • <bdo id='iyHbz'></bdo><ul id='iyHbz'></ul>

    1. <i id='iyHbz'><tr id='iyHbz'><dt id='iyHbz'><q id='iyHbz'><span id='iyHbz'><b id='iyHbz'><form id='iyHbz'><ins id='iyHbz'></ins><ul id='iyHbz'></ul><sub id='iyHbz'></sub></form><legend id='iyHbz'></legend><bdo id='iyHbz'><pre id='iyHbz'><center id='iyHbz'></center></pre></bdo></b><th id='iyHbz'></th></span></q></dt></tr></i><div id='iyHbz'><tfoot id='iyHbz'></tfoot><dl id='iyHbz'><fieldset id='iyHbz'></fieldset></dl></div>
      <tfoot id='iyHbz'></tfoot>

      <legend id='iyHbz'><style id='iyHbz'><dir id='iyHbz'><q id='iyHbz'></q></dir></style></legend>

        如何提供 Google Cloud Storage 图片?

        时间:2023-11-07
          <tbody id='t5Fes'></tbody>

          <small id='t5Fes'></small><noframes id='t5Fes'>

        1. <i id='t5Fes'><tr id='t5Fes'><dt id='t5Fes'><q id='t5Fes'><span id='t5Fes'><b id='t5Fes'><form id='t5Fes'><ins id='t5Fes'></ins><ul id='t5Fes'></ul><sub id='t5Fes'></sub></form><legend id='t5Fes'></legend><bdo id='t5Fes'><pre id='t5Fes'><center id='t5Fes'></center></pre></bdo></b><th id='t5Fes'></th></span></q></dt></tr></i><div id='t5Fes'><tfoot id='t5Fes'></tfoot><dl id='t5Fes'><fieldset id='t5Fes'></fieldset></dl></div>
            <bdo id='t5Fes'></bdo><ul id='t5Fes'></ul>
              • <legend id='t5Fes'><style id='t5Fes'><dir id='t5Fes'><q id='t5Fes'></q></dir></style></legend>
                1. <tfoot id='t5Fes'></tfoot>

                  本文介绍了如何提供 Google Cloud Storage 图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I want google.appengine.ext.blobstore and google.appengine.api.images to work outside of App Engine. Do these modules require App Engine in order to work? I want to create public but not guessable URLs of my images on Google Cloud Storage and serve them via Django.

                  I read that this is done with google.appengine.ext.blobstore.create_gs_key() and google.appengine.api.images.get_serving_url(). This is what I have so far:

                  from google.appengine.api import images
                  from google.appengine.ext import blobstore
                  
                  bucketname = 'mybucket'
                  
                  gcs_object_name = '/gs/mybucket/vincent-van-gogh/the-starry-night.jpg'
                  blob_key = blobstore.create_gs_key(gcs_object_name)
                  image_url = images.get_serving_url(blob_key)
                  

                  And image_url is supposed to be a public but not guessable URL of my image. If I run this code, the error is

                  AssertionError: No api proxy found for service "blobstore"
                  

                  This suggests blobstore needs a proxy, aka App Engine, in order to work its magic. Can App Engine modules work outside of App Engine? The docs say the above is a powerful way to serve images because I can generate a URL for each image and also resize the image dynamically.

                  Will this strategy work or is there a better way to serve images from Google Cloud Storage with Django?

                  解决方案

                  The blobstore and images APIs are available only within the App Engine runtime environment. To run them inside compute engine you can:

                  • Run them inside Managed VMs (the GAE runtime environment on GCE)

                  • Run them on your own infrastructure or GCE using a GAE API emulator (such as AppScale)

                  • Use public APIs (such as Google Cloud Storage) instead

                  Some App Engine services (such as Datastore) now also expose public APIs that you can use from GCE.

                  这篇关于如何提供 Google Cloud Storage 图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何从谷歌存储云读取数据到谷歌云数据实验室 下一篇:如何在gae云上打开gzip文件?

                  相关文章

                    <bdo id='pRZLV'></bdo><ul id='pRZLV'></ul>

                    <tfoot id='pRZLV'></tfoot>
                    <legend id='pRZLV'><style id='pRZLV'><dir id='pRZLV'><q id='pRZLV'></q></dir></style></legend>
                    <i id='pRZLV'><tr id='pRZLV'><dt id='pRZLV'><q id='pRZLV'><span id='pRZLV'><b id='pRZLV'><form id='pRZLV'><ins id='pRZLV'></ins><ul id='pRZLV'></ul><sub id='pRZLV'></sub></form><legend id='pRZLV'></legend><bdo id='pRZLV'><pre id='pRZLV'><center id='pRZLV'></center></pre></bdo></b><th id='pRZLV'></th></span></q></dt></tr></i><div id='pRZLV'><tfoot id='pRZLV'></tfoot><dl id='pRZLV'><fieldset id='pRZLV'></fieldset></dl></div>

                    <small id='pRZLV'></small><noframes id='pRZLV'>