Migrating from App Engine Files API

前端 未结 4 1202
终归单人心
终归单人心 2020-12-21 11:27

My app stores a bunch of images as blobs. This is roughly how I store images.

from google.appengine.api import files
# ...
fname = files.blobstore.create(mim         


        
4条回答
  •  春和景丽
    2020-12-21 12:05

    I received an email from Google Cloud Platform on May 19, 2015, an excerpt is shown here:

    The removal of the Files API will happen in the following manner.

    On May 20th, 2015 no new applications will have access to the Files API. Applications that were created prior to May 20th, 2015 will continue to run without any issues. That said, we strongly encourage developers to start switching over to the Cloud Storage Client Library today.

    On July 28th, 2015 starting at 12pm Pacific Time, the Files API will be temporarily shutdown for 24 hrs.

    On August 4th, 2015, we will permanently shut down the Files API at 12:00pm Pacific time.

    Since I was using the exact same code to write a blobstore file, I spent a day researching the GCS system. After failing to get a "service account" to work (by going through poorly documented OAuth2 confusion), I gave up on using GCS.

    Now I am using ndb's BlobProperty. I keep the blobs in a separate model using both a parent key and a key name (as filename) to locate the images. Using a separate model keeps the huge blob out of my regular entities so fetches aren't slowed down by their sheer size. I wrote a separate REST API just for the images.

提交回复
热议问题