【发布时间】:2021-08-03 09:09:57
【问题描述】:
我正在尝试制作一个可以搜索文件/文件夹的功能。如果文件/文件夹存在,那么它将返回 id 否则将在 PHP 中从驱动器返回 null,但每次我这样做都表明 q 中有一些错误。
An error occurred: {
"error": {
"errors": [
{
"domain": "global",
"reason": "invalid",
"message": "Invalid Value",
"locationType": "parameter",
"location": "q"
}
],
"code": 400,
"message": "Invalid Value"
}
}
查询是:-
//testing-folder-of-api is the name of the folder
mimeType=application/vnd.google-apps.folder and name='testing-folder-of-api'
我也尝试过改变它:
-
mimeType!=application/vnd.google-apps.folder如果不是文件 -
name contains 'test.txt'和title='test.txt'按名称搜索。
我找到的解决方案是循环遍历所有文件并使用循环单独检查名称,这需要很长时间。
谁能告诉我怎么做。请!!
【问题讨论】:
标签: php google-drive-api