w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Insert a file to google drive using google app engine. python client api used

i tried your code and the problem is fixed if when u try to upload the file instead of using this code

file = service.files().insert(
                body=body,
                media_body=media_body).execute()

you use this

file = service.files().insert(
                body=body,
                media_body=media_body).execute(http=decorator.http())

the difference is that you specify that the credentials that will be used for the upload are the ones that you have authenticated using the decorator.

Hope it helps





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.