How do I upload image Podio SDK using Objective-C (iOS)? -


i integrating podio sdk. getting data item values , updating also, images won't upload. idea? don't know how upload image on podio sdk.

nsdata *data = uiimagejpegrepresentation(self.imgview_sign.image, 0.8f);

[[[pktfile uploadwithdata:data filename:@"mobi.jpg"] pipe:^pktasynctask *(pktfile *file){      pktitem *item = [pktitem itemforappwithid:431525395];     item[@"title"] = @"chekri";     item[@"signautre"] = file;     return [item save];  }] onsuccess:^(pktitem *item){     nslog(@"pkt file %@",item);  } onerror:^(nserror *error){      nslog(@"error file %@",error); }]; 

please use below code might work you.

uiimage *image = [uiimage imagenamed:@"some-image.jpg"]; nsdata *data = uiimagejpegrepresentation(image, 0.8f);  pktasynctask *uploadtask = [pktfile uploadwithdata:data filename:@"image.jpg"];  [uploadtask oncomplete:^(pktfile *file, nserror *error) {   if (!error) {     nslog(@"file uploaded id: %@", @(file.fileid));   } }]; 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -