如何在 google 驱动器 api 中获取多个图像类型 PHP

how to get multiple image types in google drive api in PHP

我有这个

$opt = array('q'=>"mimeType = 'image/jpeg' and name contains '".$file."'")

仅获取 jpeg 类型的图像。有没有办法做这样的事情:

$opt = array('q'=>"mimeType = 'image/*' and name contains '".$file."'")

并获取各种图像。希望你明白了。谢谢

因为通配符 * 没有 return 全部,所以使用 "or" 代替并走长路:

mimeType = 'image/jpg' or mimeType = 'image/png' or mimeType = 'image/bmp'

你懂的。这有效。

也是mentioned by Eric Koledalagoogle工程师,目前不支持。所以使用解决方法。