1

我想将图像从我的服务器上传到谷歌云存储。我不知道该怎么做。

4

1 回答 1

1

根据您的标签,我猜您正在使用带有 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 云存储”部分了解更多信息。

于 2013-10-11T17:42:56.833 回答