title: Using Drupal Services and DIOS SDK for setting user picture in iOS app
body: <p>I'm trying to set a user picture (fid) for a user after successfully uploading a photo using Drupal services and DIOS SDK. I upload the file using the "fileSave" method of DIOS SDK (DIOSFile). Services then returns an "fid" for the user picture that was just uploaded. When I try to set the fid for the user picture field for the user who is currently logged in, it doesn't get set. There is no error, it actually returns successfully, but if I check on the "picture" field in the users table of the database, nothing is set. I can update other data that is attached to a user such as username, email, password and other custom fields so I don't think it's a permission issue.</p>
  
  <p>I've tried the following code and many variations of it, but nothing seems to updated the "picture" field.</p>
  
  <pre><code>    _userUpdateParams = [NSMutableDictionary new];
      NSString *fid = @"22"; //For demonstration purposes, I'm hard-coding an fid value.
  
      if (username)
          [_userUpdateParams setValue:username forKey:@"name"];
  
      if (password)
          [_userUpdateParams setValue:password forKey:@"current_pass"];
  
      if (newPassword)
          [_userUpdateParams setValue:newPassword forKey:@"pass"];
  
      if (email)
          [_userUpdateParams setValue:email forKey:@"mail"];
  
      if (fid)
          [_userUpdateParams setValue:fid forKey:@"picture"];
  
      if (uid)
          [_userUpdateParams setValue:uid forKey:@"uid"];
  
  
      [DIOSUser userUpdate:_userUpdateParams
                     success:^(AFHTTPRequestOperation *operation, id responseObject) {
                         ...
                     } failure:^(AFHTTPRequestOperation *operation, NSError *error) {
                         ...
                     }];
  </code></pre>
  
  <p>This post suggested to use the "fid" of the file: <a href="https://github.com/kylebrowning/drupal-ios-sdk/issues/28" rel="nofollow">https://github.com/kylebrowning/drupal-ios-sdk/issues/28</a></p>