【发布时间】:2017-06-24 03:15:52
【问题描述】:
调用 Google Drive API v2 (https://developers.google.com/drive/v2/reference/files/insert) 时出错:
$service->files->insert()
我的脚本首先将文件上传到服务器,然后将文件上传到 Google Drive 存储。 它适用于小文件,但如果我尝试大文件(90-100 MB),我得到:
An error occurred: Operation timed out after 100000 milliseconds with 0 bytes received.
这是 Google 限制(文档:最大文件大小:5120GB)还是我需要设置任何 PHP 参数?
我使用上一个链接中包含的相同代码,并尝试在 php.ini 中增加此参数:
- upload_max_filesize = 100M
- post_max_size = 100M
- max_execution_time = 300
- max_input_time = 300
- memory_limit = 1024M
文件已正确上传到服务器。
【问题讨论】:
标签: php google-drive-api