From 114e210c4607bf1c78f8c789e85131d251b9d093 Mon Sep 17 00:00:00 2001 From: Martin Melka Date: Fri, 11 Apr 2025 13:01:03 +0200 Subject: [PATCH] Add doc for accessing a shared folder on a team drive To access a shared folder which is on a separate team drive without knowing the team drive ID, the enableTeamDriveSupport() needs to be called explicitly. Otherwise, the folder won't be found and an error will occur: ``` Not able to write the file ``` --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 931548c..c116f97 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,16 @@ $adapter4 = new \Masbug\Flysystem\GoogleDriveAdapter( ] ); +// variant 5: connect to a folder shared with you, which is on a shared team drive +$adapter5 = new \Masbug\Flysystem\GoogleDriveAdapter( + $service, + 'My_App_Root', + [ + 'sharedFolderId' => '0GF9IioKDqJsRGk9PVA' + ] +); +$adapter5->enableTeamDriveSupport(); + $fs = new \League\Flysystem\Filesystem($adapter, new \League\Flysystem\Config([\League\Flysystem\Config::OPTION_VISIBILITY => \League\Flysystem\Visibility::PRIVATE])); ```