-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Labels
🚨This issue needs some love.This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
It seems like the bug #241 and @Aran-Fey's problem happened again when i trying to download and upload 0 bytes file using google drive api.
credentials = google.oauth2.credentials.Credentials(**token)
services_account = googleapiclient.discovery.build(API_SERVICE_NAME, API_VERSION, credentials=credentials)
fd= BytesIO()
media = googleapiclient.http.MediaIoBaseUpload(fd=fd, chunksize=128, mimetype='text/plain', resumable=True)
body = {'name' : 'foo.txt'}
services_account.files().insert(body=body, media_body=media, fields='id').execute()throws
`googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/upload/drive/v2/files?fields=id&alt=json&uploadType=resumable
returned "Bad Request">`
ajeeb-kp-kelenoajeeb-kp-kelenoajeeb-kp-keleno
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.