SHARE
TWEET

Untitled

a guest Jul 17th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Sub SurroundingSub()
  2.     Dim fileMetadata = New File() With {
  3.         .Name = "photo.jpg"
  4.     }
  5.     Dim request As FilesResource.CreateMediaUpload
  6.  
  7.     Using stream = New System.IO.FileStream("files/photo.jpg", System.IO.FileMode.Open)
  8.         request = driveService.Files.Create(fileMetadata, stream, "image/jpeg")
  9.         request.Fields = "id"
  10.         request.Upload()
  11.     End Using
  12.  
  13.     Dim file = request.ResponseBody
  14.     Console.WriteLine("File ID: " & file.Id)
  15. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top