google api사용해서 google drive에 파일 업로드 - 1
https://www.daimto.com/upload-file-to-google-drive/
Upload file to Google drive
Are you working on an application where you would like to upload a file to Google drive. There are some changes from google drive v2 to the new Google drive v3 and a lot of the samples out there for v2 wont work for the new Google drive API v3.
www.daimto.com
보고 따라함.. winform에서 실행하는거라서 코드 변경 함.
https://www.youtube.com/watch?v=asrCdWFrF0A
보고 service account 생성함. 생성하고 json파일을 잘 알수있는 경로에 다운로드 시킨다. 이게 있어야 drive에 업로드 가능하다.
https://console.cloud.google.com/apis/library
Google 클라우드 플랫폼
로그인 Google 클라우드 플랫폼으로 이동
accounts.google.com
들어가서 google drive api 검색후 사용버튼 클릭
visual studio에서 도구>>Nuget 패키지관리자 >> 솔루션용 Nuget 패키지 관리 클릭하면 ▼ 화면 나옴.
Google.Apis.Auth, Google.Apis.Drive.v3, Microsoft.WindowsAPICodePack, Microsoft.WindowsAPICodePack.shell
검색하고 설치하면 됨. 설치후에 설치됨을 클릭하고 제대로 설치되었는지 확인한다.
제대로 설치되었으면 이렇게 using을 사용하여 import 외부 dll파일을 사용할 수 있다. dll파일은 우측 참조에서 확인가능함.!!