Skip to content

Commit

Permalink
logging resumable upload expiration datetime for debug googleapis#326
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Casanovas committed Oct 10, 2019
1 parent 302c4a0 commit 38700f6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions O365/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,10 @@ def upload_file(self, item, chunk_size=DEFAULT_UPLOAD_CHUNK_SIZE):
data = response.json()

upload_url = data.get(self._cc('uploadUrl'), None)
log.info('Resumable upload on url: {}'.format(upload_url))
expiration_date = data.get(self._cc('expirationDateTime'), None)
if expiration_date:
log.info('Expiration Date for this upload url is: {}'.format(expiration_date))
if upload_url is None:
log.error('Create upload session response without '
'upload_url for file {}'.format(item.name))
Expand Down

0 comments on commit 38700f6

Please sign in to comment.