title: Swift 3 upload image to Parse Server
body: <p>I'm trying to upload an image to Parse Server usinf <strong>PFFile</strong>. I'm not having issues uploading it manually from <strong>Parse Dashboard</strong> and retrieving it from the app. But if I try to upload a new one with this method, the image is not being updated.</p>
  
  <p>The rest of fields are beeing uploaded correctly <em>(name, lastname, username and email)</em></p>
  
  <p><strong>Save method:</strong></p>
  
  <pre><code>@IBAction func saveBtnPressed(_ sender: Any) {
  
      print("Start saving...")
  
      let imageData = UIImagePNGRepresentation(profilePic.image!)
      print ("imageData value:")
      print(imageData!)
      let imageFile = PFFile(name:"avatar.png", data:imageData!)
      print ("imageFile value:")
      print(imageFile!)
  
      let query = PFQuery(className: "_User")
      query.whereKey("username", equalTo: (PFUser.current()?.username)!)
      query.findObjectsInBackground(block: { (objects, error) in
      if let user = objects {
          for object in user {
              object["name"] = self.nameFld.text
              object["lastname"] = self.lastnameFld.text
              object["username"] = self.emailFld.text
              object["email"] = self.emailFld.text
              object["avatar"] = imageFile
  
              print(object)
              object.saveInBackground()
          }
      }
      })
  
  }
  </code></pre>
  
  <p><strong>Output</strong>:</p>
  
  <pre><code>Start saving...
  imageData value:
  8358983 bytes
  (lldb)
  </code></pre>