【问题标题】:google drive / php request for resumable upload谷歌驱动器/ php请求恢复上传
【发布时间】:2013-10-19 08:37:05
【问题描述】:

如何在 php 中发送此请求?
https://developers.google.com/drive/manage-uploads#resumable

POST /upload/drive/v2/files?uploadType=resumable HTTP/1.1
Host: www.googleapis.com
Authorization: your_auth_token
Content-Length: 38
Content-Type: application/json; charset=UTF-8
X-Upload-Content-Type: image/jpeg
X-Upload-Content-Length: 2000000

{
  "title": "My File"
}

【问题讨论】:

  • 谷歌PHP cURL Post Request

标签: php request google-drive-api


【解决方案1】:

看看 php curl。您可以使用它发出请求并根据需要更改请求的标头。

php 文档

http://php.net/manual/en/book.curl.php

教程开始

http://coderscult.com/php-curl-tutorial-and-example/

但是 google drive 有一个出色的 api 那么为什么不使用它呢?

https://developers.google.com/drive/manage-uploads

【讨论】:

  • 如何使用 php 客户端库发出这样的请求?与 Google_Http_Request ?我应该在 $url 中放什么?
猜你喜欢
  • 2018-08-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多