From 511d5933c4212514721328f5b236c880a6e135d3 Mon Sep 17 00:00:00 2001 From: silviuvulcan Date: Wed, 29 Apr 2020 15:26:10 +0300 Subject: [PATCH 1/2] Teams drive upload now actually works --- upload.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload.sh b/upload.sh index 6e12cc4..7d05382 100755 --- a/upload.sh +++ b/upload.sh @@ -344,7 +344,7 @@ driveInfo() { --silent \ -XGET \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ - "https://www.googleapis.com/drive/v3/files/""$FOLDER_ID""?fields=""$FETCH""")" + "https://www.googleapis.com/drive/v3/files/""$FOLDER_ID""?fields=""$FETCH""&supportsAllDrives=true")" local FETCHED_DATA FETCHED_DATA="$(echo "$SEARCH_RESPONSE" | jsonValue "$FETCH" 1)" if [ -z "$FETCHED_DATA" ]; then From 1c2fcee8786c44e4defc593e248d5d1a2ca99c97 Mon Sep 17 00:00:00 2001 From: silviuvulcan Date: Wed, 29 Apr 2020 15:40:47 +0300 Subject: [PATCH 2/2] Added teams support to create folder --- upload.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload.sh b/upload.sh index 7d05382..385a740 100755 --- a/upload.sh +++ b/upload.sh @@ -377,7 +377,7 @@ createDirectory() { --silent \ -XGET \ -H "Authorization: Bearer ${ACCESS_TOKEN}" \ - "https://www.googleapis.com/drive/v3/files?q=${QUERY}&fields=files(id)")" + "https://www.googleapis.com/drive/v3/files?q=${QUERY}&fields=files(id)&supportsAllDrives=true")" local FOLDER_ID FOLDER_ID="$(echo "$SEARCH_RESPONSE" | jsonValue id 1)" if [ -z "$FOLDER_ID" ]; then @@ -390,7 +390,7 @@ createDirectory() { -H "Authorization: Bearer ${ACCESS_TOKEN}" \ -H "Content-Type: application/json; charset=UTF-8" \ -d "$CREATE_FOLDER_POST_DATA" \ - "https://www.googleapis.com/drive/v3/files?fields=id")" + "https://www.googleapis.com/drive/v3/files?fields=id&supportsAllDrives=true")" FOLDER_ID="$(echo "$CREATE_FOLDER_RESPONSE" | jsonValue id)" fi echo "$FOLDER_ID"