【问题标题】:Upload images by auto executing script to google cloud storage from server通过自动执行脚本将图像从服务器上传到谷歌云存储
【发布时间】:2013-10-19 07:11:10
【问题描述】:

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

【问题讨论】:

    标签: php google-app-engine google-cloud-storage google-api-php-client


    【解决方案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 云存储”部分了解更多信息。

    【讨论】:

      猜你喜欢
      • 2017-12-06
      • 2015-02-28
      • 1970-01-01
      • 2015-02-20
      • 2018-07-11
      • 1970-01-01
      • 1970-01-01
      • 2017-05-03
      • 2020-10-21
      相关资源
      最近更新 更多