iphone - Error while uploading image on dropbox -


i'm developing iphone app need upload image in folder.i'm taking image saved photo album , saving in folder.i want upload image i'm getting error.

here code

nsmutablearray *array=[[nsmutablearray alloc]init]; nsstring *foldername; if (metadata.isdirectory) {     nslog(@"folder '%@' contains:", metadata.path);     (dbmetadata *file in metadata.contents)     {         [array addobject:file.filename];         nslog(@"\t%@", file.filename);     }      foldername=[array objectatindex:0]; }  nsstring  *pngimagepath = [[nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) lastobject] stringbyappendingpathcomponent:[nsstring stringwithformat:@"%@.png",imagename.text]]; [data writetofile:pngimagepath atomically:yes];  [[self restclient]uploadfile:[nsstring stringwithformat:@"%@.png",imagename.text] topath:[nsstring stringwithformat:@"/%@",foldername]withparentrev:nil frompath:pngimagepath]; 

i'm getting below error

file upload failed error - error domain=nsurlerrordomain code=-1021 "the operation couldn’t completed. (nsurlerrordomain error -1021.)" userinfo=0x68d0c70 {destinationpath=/sonal/abc.png, sourcepath=/users/bcod/library/application support/iphone simulator/5.0/applications/44555d9c-422e-45fc-b392-f74275b16378/documents/abc.png} 

i'm getting following warning

[warning] dropboxsdk: error making request /1/files_put/dropbox/apple/app.png 

please can tell me why getting error

thanks in advance

check destination path.. seems issue @ server not able find destination folder
,
check image size. large file might causing exhaust request. try smaller images


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -