From d75f7f09bc3fb75256e8a03bae0d24045ba30ad2 Mon Sep 17 00:00:00 2001 From: Vladimir Noskov Date: Tue, 6 Dec 2022 19:26:15 +0300 Subject: [PATCH 1/3] Update GoogleDriveAdapter.php Publish a folder --- src/GoogleDriveAdapter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/GoogleDriveAdapter.php b/src/GoogleDriveAdapter.php index 654a3eb..fa0498c 100644 --- a/src/GoogleDriveAdapter.php +++ b/src/GoogleDriveAdapter.php @@ -959,6 +959,9 @@ public function getUrl($path) if (($url = $obj->getWebViewLink())) { return $url; } + if ($obj->id) { + return 'https://drive.google.com/drive/folders/' . $obj->id . '?usp=sharing'; + } } return false; } From 60d95fc0e6850940181ab5196bf0f0a3dbb06ec8 Mon Sep 17 00:00:00 2001 From: Vladimir Noskov Date: Tue, 6 Dec 2022 19:45:06 +0300 Subject: [PATCH 2/3] Update GoogleDriveAdapter.php --- src/GoogleDriveAdapter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GoogleDriveAdapter.php b/src/GoogleDriveAdapter.php index fa0498c..c205e65 100644 --- a/src/GoogleDriveAdapter.php +++ b/src/GoogleDriveAdapter.php @@ -959,8 +959,8 @@ public function getUrl($path) if (($url = $obj->getWebViewLink())) { return $url; } - if ($obj->id) { - return 'https://drive.google.com/drive/folders/' . $obj->id . '?usp=sharing'; + if ($obj->mimeType === self::DIRMIME) { + return 'https://drive.google.com/drive/folders/'.$obj->id.'?usp=sharing'; } } return false; From a9277ed885d66344a748dda1a8fc22a1de7c0c9a Mon Sep 17 00:00:00 2001 From: Vladimir Noskov Date: Tue, 6 Dec 2022 19:46:25 +0300 Subject: [PATCH 3/3] Update GoogleDriveAdapter.php --- src/GoogleDriveAdapter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GoogleDriveAdapter.php b/src/GoogleDriveAdapter.php index c205e65..52c0ebf 100644 --- a/src/GoogleDriveAdapter.php +++ b/src/GoogleDriveAdapter.php @@ -961,7 +961,7 @@ public function getUrl($path) } if ($obj->mimeType === self::DIRMIME) { return 'https://drive.google.com/drive/folders/'.$obj->id.'?usp=sharing'; - } + } } return false; }