Closed SushiTheory closed 2 years ago
.in("Java", "parents")
I'm pretty sure the ID of the folder must be specified, not the name.
Btw, you're listing folders, not files (.e("mimeType", MimeTypes.FOLDER)
).
Yupp that fixed it, replacing "root" with the full ID gets the job done. Thank you so much!!!
You're welcome, glad you sorted it out. Would you mind closing the issue if the question is solved?
Hello Robin, How Can I Create Specific Folder on Google Drive and get that Folder's ID? Please Help me
Hello RutvikUnjiya,
Something like
await gdrive.files.newMetadataOnlyUploader()
setRequestBody({
name: "Folder",
mimeType: MimeTypes.FOLDER,
parents: ["root"]
})
.execute()
Please have a look at the docs to get the created folder id from the result.
Hello Robin
I am stiill unable to fetch the files from a specific folder even after replacing root with the folder i wanted.
this is the function i called
await gdrive.files.list({ q: new ListQueryBuilder() .e("mimeType", MimeTypes.FOLDER) .and() .in("Java", "parents") })
but the result i get is [HttpError: { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "File not found: .", "locationType": "parameter", "location": "fileId" } ], "code": 404, "message": "File not found: ." } } ]