【发布时间】:2014-12-01 01:54:53
【问题描述】:
我已经搜索了如何使用php在googledriveapi上上传文件。我使用了以下方法
$file-setMimetype='image/jpg';
$file->setTitle='abcd'
$service->files->insert($file).
它在 googledrive 上插入带有标题和 mimetype 的文件,但它是空的。我的问题是如何上传文件中包含的实际数据或内容,即如果我想将图像或 pdf 文件从我的系统上传到 googledrive。如何我要吗?请帮助我了解如何在 $data 中发送实际数据。$data 变量应该包含什么。
【问题讨论】:
标签: php google-drive-api