Skip to content

Commit

Permalink
nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinHsieh committed Aug 24, 2023
1 parent e2b4a75 commit a301db4
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Sharely/share_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def callback(request_id, response, exception):

# See method details in:
# https://developers.google.com/resources/api-libraries/documentation/drive/v3/python/latest/drive_v3.permissions.html
batch.add(service.permissions().create(fileId=file_id,
emailMessage=email_message,
body=user_permission,
fields='id',))

batch.execute()
# batch.add(service.permissions().create(fileId=file_id,
# emailMessage=email_message,
# body=user_permission,
# fields='id',))
#
# batch.execute()

user_permission = {'type': 'user',
'role': 'reader',
Expand All @@ -96,6 +96,7 @@ def callback(request_id, response, exception):
}

batch.add(service.permissions().update(fileId=file_id,
emailMessage=email_message,
permissionId=ids[-1],
body=user_permission,
fields='id',))
Expand Down

0 comments on commit a301db4

Please sign in to comment.