[英]how to get the file id of a file in google drive using php
嗨,我一直在googling
有关如何使用php
将文件上传到google drive
的id
的问题。到目前为止,每个上传的文件都是唯一命名的,我已经找到了这个答案,但这是针对python
..但是我想要一个php
如何在python Google驱动器API中获取fileID或parentID? 另一个虽然是为php而设计的,但是我不知道如何使它工作。https://developers.google.com/drive/v2/reference/files/insert任何帮助将不胜感激。
答案就在问题上。
转到您引用的页面,您会发现
$createdFile = $service->files->insert($file, array(
'data' => $data,
'mimeType' => $mimeType,
));
// Uncomment the following line to print the File ID
// print 'File ID: %s' % $createdFile->getId();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.