I'm trying to upload a file to a folder that is hosted inside a Team Drive in Google Drive. I can get the Team Drive and upload a file to the main folder using:
td <- team_drive_get(team_drive_name)
drive_upload(here(file_name), path = td)
However, if I use team_drive_get with the name or the id of the subfolder I'm interested in, I get the following error:
Error: HTTP error [404] Shared drive not found: subfolder_id
* domain: global
* reason: notFound
* message: Shared drive not found: subfolder_id
* locationType: parameter
* location: driveId
I also tried using the name parameter to access the subfolder with:
td <- team_drive_get(team_drive_name)
drive_upload(here(file_name), path = td, name=glue("/{subfolder_name}/{file_name}"))
But again this creates a file in the main folder. Is there any workaround to access the Team Drive's subfolders?