title: C# : How to Upload File to a Specific Folder using Google Drive API v3 - Windows Console Application
body: <p>I am trying to upload an image to my google drive using c#. This code works fine if i want to upload to root directory.
  But i want to upload my images to specific folder in my Drive.
  Suggestion Needed.</p>
  <pre><code>private static void UploadBasicImage(string file_path,DriveService service)
      {
          var fileMetadata = new Google.Apis.Drive.v3.Data.File();
          fileMetadata.Name = Path.GetFileName(path);
          fileMetadata.MimeType = &quot;image/png&quot;;
          FilesResource.CreateMediaUpload request;
          using (var stream = new System.IO.FileStream(path,System.IO.FileMode.Open))
          {
              request = service.Files.Create(fileMetadata, stream, fileMetadata.MimeType);
              request.Fields = &quot;id&quot;;
              request.Upload();
          }
          var file = request.ResponseBody;
      }
  </code></pre>