我只想返回 Google Drive SDK 中特定文件夹的子文件夹。如果我有以下结构
mainfolder -> //id:1234567
testing1 ->
actuafile.png
testing.png
testing2 ->
banass.png
testing3 ->
到目前为止我的测试代码,但它打印了所有文件,它包括 testing1,testing2..
和 actuafile.png,testing.png...
var request = gapi.client.drive.files.list({
'q': "'1234567' in parents"
});
request.execute(function(r){
console.log(r);
});
如何限制仅显示第一个文件夹?
最佳答案
进行搜索查询:
父级中的 mimeType = 'application/vnd.google-apps.folder' 和 '123456'
关于javascript - 获取选定文件夹上的第一个子文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22644663/