1 Reply Latest reply on Nov 19, 2014 8:58 AM by Ryan Rutan

    Unable to upload status update with image (iOS)

    fotes

      So i've got the following code that seems to be both uploading the image (I can check the ref URL and see an image), and the status update with text, but the image is not coming through. Any help would be greatly appreciated.

       

              [self.jiveInstance uploadImage:image

                                  onComplete:^(JiveImage *image) {

                                      JiveAttachment *imageAttachment = [[JiveAttachment alloc] init];

                                      imageAttachment.contentType = image.contentType;

                                      imageAttachment.url = image.ref;

                                      imageAttachment.name = image.name;

                                      imageAttachment.doUpload = @(YES);

                                      [self.jiveInstance createUpdate:statusUpdate

                                                      withAttachments:@[imageAttachment]

                                                              options:nil

                                                           onComplete:^(JiveContent *content) {

                                                               if (completion) {

                                                                   completion(content);

                                                               }

                                                           } onError:^(NSError *error) {

                                                               if (errorBlock) {

                                                                   errorBlock(error);

                                                               }

                                                           }];

                                  } onError:^(NSError *error) {

                                      if (errorBlock) {

                                          errorBlock(error);

                                      }

                                  }];