2017-04-10 2 views

답변

3

아마도 JSON API를 대신 사용하고 google-cloud-storage 라이브러리를 사용하고 싶을 것입니다. 버킷에 대한 문서는 here입니다.

이 시도하지 않은,하지만 뭔가 같은 :

from google.cloud import storage 

bucket = storage.Client().get_bucket('bucket-id-here') 
bucket.cors = [{ 
    origin: ['*', ...], 
    method: ['GET', ...], 
    responseHeader: ['some-resp-header', ...], 
    maxAgeSeconds: 86400, # one day 
}] 
bucket.patch() # Send the update 
+0

나는 위의 제안을했지만, 그것은 스토리지에 버킷 업데이트되지 않았습니다. 몇 가지 추가 정보로 나를 도울 수 있습니까? – user3571631

+0

버킷에서 [patch] (https://googlecloudplatform.github.io/google-cloud-python/stable/storage-buckets.html#google.cloud.storage.bucket.Bucket.patch)를 호출해야 할 수 있습니다. 업데이트를 보낼 수 있습니다. –

+0

건배, – user3571631

관련 문제