Skip to content

Commit

Permalink
gupload: Fix sharing for shared drives
Browse files Browse the repository at this point in the history
  • Loading branch information
Akianonymus committed Oct 16, 2020
1 parent a0d799a commit d25af84
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bash/drive-utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ _share_id() {
-H "Authorization: Bearer ${token}" \
-H "Content-Type: application/json; charset=UTF-8" \
-d "${share_post_data}" \
"${API_URL}/drive/${API_VERSION}/files/${id}/permissions" || :)" && _clear_line 1 1>&2
"${API_URL}/drive/${API_VERSION}/files/${id}/permissions?supportsAllDrives=true&includeItemsFromAllDrives=true" || :)" && _clear_line 1 1>&2
_clear_line 1 1>&2

{ _json_value id 1 1 <<< "${share_response}" 2>| /dev/null 1>&2 && return 0; } ||
Expand Down
2 changes: 1 addition & 1 deletion bash/release/gupload
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ _share_id() {
-H "Authorization: Bearer ${token}" \
-H "Content-Type: application/json; charset=UTF-8" \
-d "${share_post_data}" \
"${API_URL}/drive/${API_VERSION}/files/${id}/permissions" || :)" && _clear_line 1 1>&2
"${API_URL}/drive/${API_VERSION}/files/${id}/permissions?supportsAllDrives=true&includeItemsFromAllDrives=true" || :)" && _clear_line 1 1>&2
_clear_line 1 1>&2

{ _json_value id 1 1 <<< "${share_response}" 2>| /dev/null 1>&2 && return 0; } ||
Expand Down
2 changes: 1 addition & 1 deletion sh/drive-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ _share_id() {
-H "Authorization: Bearer ${token_share_id}" \
-H "Content-Type: application/json; charset=UTF-8" \
-d "${post_data_share_id}" \
"${API_URL}/drive/${API_VERSION}/files/${id_share_id}/permissions" || :)" && _clear_line 1 1>&2
"${API_URL}/drive/${API_VERSION}/files/${id_share_id}/permissions?supportsAllDrives=true&includeItemsFromAllDrives=true" || :)" && _clear_line 1 1>&2
_clear_line 1 1>&2
{ printf "%s\n" "${response_share_id}" | _json_value id 1 1 2>| /dev/null 1>&2 && return 0; } ||
Expand Down
2 changes: 1 addition & 1 deletion sh/release/gupload
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ _share_id() {
-H "Authorization: Bearer ${token_share_id}" \
-H "Content-Type: application/json; charset=UTF-8" \
-d "${post_data_share_id}" \
"${API_URL}/drive/${API_VERSION}/files/${id_share_id}/permissions" || :)" && _clear_line 1 1>&2
"${API_URL}/drive/${API_VERSION}/files/${id_share_id}/permissions?supportsAllDrives=true&includeItemsFromAllDrives=true" || :)" && _clear_line 1 1>&2
_clear_line 1 1>&2
{ printf "%s\n" "${response_share_id}" | _json_value id 1 1 2>| /dev/null 1>&2 && return 0; } ||
Expand Down

0 comments on commit d25af84

Please sign in to comment.