I am using Python 2.7 and I am trying to upload a file (*.txt) into a folder that is shared with me.
So far I was able to upload it to my Drive, but how to set to which folder. I get the url to where I must place this file.
Thank you
this is my code so far
def Upload(file_name, file_path, upload_url): upload_url = upload_url client = gdata.docs.client.DocsClient(source=upload_url) client.api_version = "3" client.ssl = True client.ClientLogin(username, passwd, client.source) filePath = file_path newResource = gdata.docs.data.Resource(filePath,file_name) media = gdata.data.MediaSource() media.SetFileHandle(filePath, 'mime/type') newDocument = client.CreateResource( newResource, create_uri=gdata.docs.client.RESOURCE_UPLOAD_URI, media=media )