Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 使用gsutil将文件上载到GCS时覆盖内容类型_Google Cloud Platform_Google Cloud Storage_Gsutil - Fatal编程技术网

Google cloud platform 使用gsutil将文件上载到GCS时覆盖内容类型

Google cloud platform 使用gsutil将文件上载到GCS时覆盖内容类型,google-cloud-platform,google-cloud-storage,gsutil,Google Cloud Platform,Google Cloud Storage,Gsutil,我有大量文件需要上传到谷歌云存储,并向其中添加内容类型。所有文件名都没有扩展名,但所有文件的内容类型都相同 我尝试使用这个命令gsutil-mcp-r。gs://bucket\u name/,但它使用应用程序/octet流内容类型上载文件 有没有一种方法可以覆盖GCS设置的默认内容类型?,它给出了一个如何做到这一点的示例: gsutil -h "Content-Type:text/html" \ -h "Cache-Control:public, max-age=3600" cp

我有大量文件需要上传到谷歌云存储,并向其中添加内容类型。所有文件名都没有扩展名,但所有文件的内容类型都相同

我尝试使用这个命令
gsutil-mcp-r。gs://bucket\u name/
,但它使用
应用程序/octet流
内容类型上载文件

有没有一种方法可以覆盖GCS设置的默认内容类型?

,它给出了一个如何做到这一点的示例:

gsutil -h "Content-Type:text/html" \
       -h "Cache-Control:public, max-age=3600" cp -r images \
       gs://bucket/images