Google Drive API javascript

后端 未结 3 1798
天涯浪人
天涯浪人 2020-12-03 08:25

I\'m trying to use the Google drive to list files.

Using the answer in https://stackoverflow.com/a/11280257 I found a problem that I can\'t discover the reason.

3条回答
  •  悲&欢浪女
    2020-12-03 08:54

    Using

    var request = gapi.client.request({
            'path': '/drive/v2/files',
            'method': 'GET',
            'params': {'maxResults': '1'}
            });
    

    instead of

    var request = gapi.client.drive.files.list({'maxResults': 5 });
    

    resolved the problem!

提交回复
热议问题