title: Uploading files to google drive using swift 3
body: <p>I already created folders and fetched them in my application using swift 3 
  Now I'm trying to upload audio files to a selected folder , I started trying with an image , and here is the code i've wrote : </p>
  
  <pre><code>let folderId: String = folders[indexPath.row].folderId
      let metadata = GTLRDrive_File.init()
      metadata.name = "weather"
      metadata.mimeType = "application/vnd.google-apps.photo"
      metadata.parents = [folderId]
  
      guard let filePath = Bundle.main.path(forResource: "weather", ofType: "png") else {
          return
      }
      guard let fileData = FileManager.default.contents(atPath: filePath) else {
  
          return
      }
  
      print("result: \(fileData.count) bytes")
  
  
      let imageFromPath = UIImage(contentsOfFile: filePath)!
      selectedimg.image = imageFromPath
  
      let uploadParameters = GTLRUploadParameters(data: fileData , mimeType: "image/png")
      uploadParameters.shouldUploadWithSingleRequest = true
      let query = GTLRDriveQuery_FilesCreate.query(withObject: metadata, uploadParameters: uploadParameters)
      query.fields = "id"
      self.service.executeQuery(query, completionHandler: {(ticket:GTLRServiceTicket, object:Any?, error:Error?) in
          if error == nil {
              //  print("File ID \(files.identifier)")
          }
          else {
              print("An error occurred: \(error)")
          }
      })
  </code></pre>
  
  <p>But when i check my drive , the image is just an empty Google doc , 0 bytes .
  I tried to show to image from the filePath and printed the fileData size and all is alright .
  I would like some help with this problem and how to fix it . Thanx in advance</p>
  
  <p><strong>Update</strong>
  I managed to work it out , i've just removed this line </p>
  
  <pre><code>metadata.mimeType = "application/vnd.google-apps.photo"
  </code></pre>