简体   繁体   中英

Using Google Cloud Storage JSON API on localhost

I've got a python app that uses Cloud Storage client library. I'm trying to create a desktop client for an app, but I can't find which url to use to start a resumable upload. Documentation for App engine deployed storage here states:

When you upload media, you use a special URI. In fact, methods that support media uploads have two URI endpoints:

  • The /upload URI, for the media. The format of the upload endpoint is the standard resource URI with an “/upload” prefix. Use this URI when transferring the media data itself. Example: POST /upload/storage/v1/b/myBucket/o.

  • The standard resource URI, for the metadata. If the resource contains any data fields, those fields are used to store metadata describing the uploaded file. You can use this URI when creating or updating metadata values. Example: POST /storage/v1/b/myBucket/o.

And also here :

For most operations you can use either of the following URLs to access objects:

storage.googleapis.com/<bucket>/<object>

<bucket>.storage.googleapis.com/<object>

But what are these urls on local machine with cloudstorage client library?

Google云端存储从根本上说是一种云服务...使用时,您正在将数据上传/下载到Google服务器,并且只能在我们提供的googleapis.com URL上完成。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM