javascript - Google drive API subfolders list issue on other accounts -
having strange issue.i have public shared folder i'm working on within app.with user can folder , subfolders , items inside.but once login test user , trying get same, wired thing happening: i'm getting first children of main folder once i'm trying items each child folder, result empty , without error.what should do?my user working well, not other. mean half working - first children deeper not.please advice.thanks
i'm sorry put text. code not problem since on user it's working well, on different user i'm getting wrote above:
here code (simplified)
gapi.client.drive.files.list({ 'q' : "'main_folder_id' in parents , trashed = false", //get categories 'pagesize' : 10, 'fields' : "nextpagetoken, files(id, name, webcontentlink, foldercolorrgb, thumbnaillink, description)", 'orderby' : 'modifiedtime desc', }).then(function(respo){ var subfolders = respo.result.files; var folderssearch = '('; _.each(subfolders, function(item, index){ or = ( index != folders.length - 1 ) ? 'or ' : ''; folderssearch = folderssearch + '"' + item.id + '"' + ' in parents ' + or; }); folderssearch = folderssearch + ')'; let getinfo = function(e){ return new promise(function(resolve){ // var self = this; let = this.gapi.client.drive.files.list({ 'q' : folderssearch + ' , trashed = false', //get projects in folders 'pagesize' : 400, 'fields' : "nextpagetoken, files(id, name, imagemediametadata, webcontentlink, thumbnaillink, parents, description)", 'orderby' : 'modifiedtime desc', }).then(function(respo){ var result = respo.result.files; return result; }) resolve(a); }); }; getinfo().then(function(inf){ var thumbs = function(e){ return new promise(function(resolve){ var folderssearch = '('; _.each(inf, function(item, index){ or = ( index != items.length - 1 ) ? 'or ' : ''; folderssearch = folderssearch + '"' + item.item_id + '"' + ' in parents ' + or; }); folderssearch = folderssearch + ')'; let = this.gapi.client.drive.files.list({ 'q' : folderssearch + ' , name contains "thumb" , trashed = false , mimetype contains "image/"', 'pagesize' : 100, 'fields' : "nextpagetoken, files( name, webcontentlink, thumbnaillink, parents )", 'orderby' : 'modifiedtime desc', }).then(function(response){ return response.result.files; }); resolve(a); }) resolve(thumbs); }; thumbs().then(function(e){ console.log(e) }) }) }) update: found wired thing: using dev console: developers.google.com/drive/v3/reference/files/list#try-it trying search 1 id getting result, trying 2 getting non!
"0b3vr4cbcxn4oeny3a19qcgjsd1k" in parents = works
("0b3vr4cbcxn4osthkexbwthrbchc" in parents or "0b3vr4cbcxn4oowdrbzvsauxfm3m" in parents or "0b3vr4cbcxn4onu00bmp2rflkdg8" in parents or "0b3vr4cbcxn4odlg5tvytdfi1uek" in parents or "0b3vr4cbcxn4oujltms1zwhbwoeu" in parents or "0b3vr4cbcxn4olxb4zkf2vzrps1u" in parents ) , trashed = false this not on others account only, still working on mine.
Comments
Post a Comment