How do I enable Google Cloud Storage on my local development server?

前端 未结 4 1577
执笔经年
执笔经年 2021-01-02 00:18

I want to use a GCS bucket as the backing for my blobstore but I cannot figure out how to set one up on my development server.

There are instructions for doing this

4条回答
  •  情歌与酒
    2021-01-02 00:35

    You need to download and integrate the Google Cloud Storage Client Library for App Engine.

    This library provides you the GcsService which is similar to the BlobstoreService, so you can write a file, read a file, delete a file and other functions provided from Cloud Storage

    When you use the code in the development environment, the uploaded files are stored in the appengine-generated folder and an __GsFileInfo__ entity is created in the local datastore which preserves the metadata attached to the file

    This library works online too, so your code will work for both development and production environments.

    Here you can find the Getting Started guide and the full JavaDoc reference

提交回复
热议问题