【发布时间】:2013-10-19 07:11:10
【问题描述】:
我想将图片从我的服务器上传到谷歌云存储。我不知道该怎么做。
【问题讨论】:
标签: php google-app-engine google-cloud-storage google-api-php-client
我想将图片从我的服务器上传到谷歌云存储。我不知道该怎么做。
【问题讨论】:
标签: php google-app-engine google-cloud-storage google-api-php-client
根据您的标签,我猜您正在使用带有 PHP 的 Google AppEngine。有关如何使用 AppEngine 和 PHP 上传到 Google Cloud Storage 的文档,请访问:https://developers.google.com/appengine/docs/php/googlestorage/
基本示例:
$options = [ "gs" => [ "Content-Type" => "text/plain" ]];
$ctx = stream_context_create($options);
file_put_contents("gs://my_bucket/hello.txt", "Hello", 0, $ctx);
查看“上传到 Google 云存储”部分了解更多信息。
【讨论】: