Skip to content

Drive API V3 - Files: list "q" parameter doesn't return files  #1957

Description

@elgatovielma

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS: Linux
  • Node.js version: 10.16.3
  • npm version: 6.9.0
  • googleapis version: ^39.2.0

Steps to reproduce

The "q" parameter is not returning the files in a folder when using the next query "'folder-id' in parents", although when using axios or the Try this API works as intended.

  1. Use the Try this API to check how the "q" parameter should work.
  2. Use this method to call the Drive API and verify it's not returning any value:
const queryFolders = (drive) => {
  // Return the Promise result after completing its task
  return new Promise((resolve, reject) => {
      // Call Files: list endpoint
      return drive.files.list({
        "q": "'folder-id' in parents",
        "fields": 'kind, files(id, name)'
      },(err, results) => err ? reject(err) : resolve(results))
    } 
  );
}

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.api: driveIssues related to the Drive API API.needs more infoThis issue needs more information from the customer to proceed.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions