title: ObjectiveFlickr Photo Upload Error
body: <p>I'm working on using the ObjectiveFlickr library to upload photos to Flickr from my iPhone app.  I am able to authorize the app and perform general requests, but I am getting an error while trying to upload a photo. The photo is meant to be uploaded is an image captured using AVFoundation.  Here is the relevant code:</p>
  
  <pre><code>UIImage *image = [[UIImage alloc] initWithData:imageData];
  if ([[AppDelegate sharedDelegate].apiContext.OAuthToken length]) {
                      NSData *uploadData = UIImageJPEGRepresentation(image, 1);
  
                     if (!flickrRequest) {
                          flickrRequest = [[OFFlickrAPIRequest alloc] initWithAPIContext:[AppDelegate sharedDelegate].apiContext];
                          flickrRequest.delegate = self;
                          flickrRequest.requestTimeoutInterval = 60.0;
                      }
  
                      [flickrRequest uploadImageStream:[NSInputStream inputStreamWithData:uploadData] suggestedFilename:@"Test" MIMEType:@"image/jpeg" arguments:[NSDictionary dictionaryWithObjectsAndKeys:@"0", @"is_public", nil]];
                      [UIApplication sharedApplication].idleTimerDisabled = YES;
  
                      NSLog(@"Can upload photo");
  </code></pre>
  
  <p>The <code>flickrRequest</code> object is defined and <code>@property</code>'d in the .h file pertaining to the code above.</p>
  
  <p>The <code>OFFlickrRequestDelegate</code> methods are as follows:</p>
  
  <pre><code>- (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest imageUploadSentBytes:(NSUInteger)inSentBytes totalBytes:(NSUInteger)inTotalBytes {
      NSLog(@"Success");
  }
  
  - (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didCompleteWithResponse:(NSDictionary *)inResponseDictionary {
      NSLog(@"%s %@ %@", __PRETTY_FUNCTION__, inRequest.sessionInfo, inResponseDictionary);
  }
  
  - (void)flickrAPIRequest:(OFFlickrAPIRequest *)inRequest didFailWithError:(NSError *)inError {
      NSLog(@"%s %@ %@", __PRETTY_FUNCTION__, inRequest.sessionInfo, inError);
      UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[inError description] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
      [alert show];
  }
  </code></pre>
  
  <p>When I run the project on the device the console shows:</p>
  
  <pre><code>Can upload photo
  Success
  Success
  Success
  Success
  flickrAPIRequest:didFailWithError:(null) Error Domain=org.lukhnos.ObjectiveFlickr Code=2147418115 "The operation couldn‚Äôt be completed. (org.lukhnos.ObjectiveFlickr error 2147418115.)"
  </code></pre>
  
  <p>Searching through the API's documentation, "error <code>2147418115</code>" is defined as "<code>OFFlickrAPIRequestFaultyXMLResponseError</code>". I'm not really sure what this means though. Also strange--"Success" appears four times when I'm only attempting to upload one photo.</p>
  
  <p>The sample app utilizing ObjectiveFlickr, "Snap and Run" uploads photos fine on the same device that I am testing on. Comparing the code between my app and Snap and Run, I don't see any major differences that could cause the photo not to upload.  </p>
  
  <p>Any help would be greatly appreciated.</p>