【文件属性】:
文件名称:upload-to-gcs:演示将图像从浏览器直接上传到 Google Cloud Storage
文件大小:361KB
文件格式:ZIP
更新时间:2021-06-01 11:40:24
Python
在存储桶上 :
IE:
gsutil cors set cors-json-file.json gs://[bucket-name]
其中 cors-json-file.json 包含:
[
{
"origin": ["http://example.appspot.com", "http://localhost:3000"],
"responseHeader": ["Content-Type"],
"method": ["GET", "POST", "HEAD"],
"maxAgeSeconds": 3600
}
]
将您的存储桶设置为公共读写:
gsutil acl set public-read-write gs://[bucket-name]
gsutil defacl set public-read gs