Upload files to Google Drive programmatically

2020-04-20 20:47发布

My requirement is to upload a single file which will be selected by the user during runtime to Google drive. I am getting email id and password from user. How to do it? If i any other requirement get from users? any feasible solution is there?

2条回答
趁早两清
2楼-- · 2020-04-20 21:36

You can use the Google Drive SDK/API, it's fairly simple stuff if you read through the documentation,

https://developers.google.com/drive/

https://developers.google.com/drive/manage-uploads

There's a .NET API available for download, although it's in beta I've used it without problem.

https://developers.google.com/drive/downloads

查看更多
【Aperson】
3楼-- · 2020-04-20 21:36

DocumentsService myService = new DocumentsService("application name"); myService.setUserCredentials("email", "password"); DocumentEntry newEntrys = myService.UploadDocument("pdf path", @"upload file name");

But I have take exception Execution of request failed: https://docs.google.com/feeds/default/private/full?convert=false

查看更多
登录 后发表回答