Saturday 15 March 2014

ios - Box: Getting sharedlink parameter immediately after uploading new file -



ios - Box: Getting sharedlink parameter immediately after uploading new file -

is there way sharedlink parameter, after uploading new file on box in boxfile block.

i've tried next code, it's returning sharedlink parameter nil.

boxfilesrequestbuilder *builder = [[boxfilesrequestbuilder alloc] init]; builder.name = imagename; builder.parentid = folderid; //--- shared link object ---// boxsharedobjectbuilder *sharedbuilder = [[boxsharedobjectbuilder alloc] init]; sharedbuilder.access = boxapisharedobjectaccessopen; builder.sharedlink = sharedbuilder; nsinputstream *inputstream = [nsinputstream inputstreamwithfileatpath:imagepath]; nsdictionary *fileattributes = [[nsfilemanager defaultmanager] attributesofitematpath:imagepath error:nil]; long long contentlength = [[fileattributes objectforkey:nsfilesize] longlongvalue]; [[boxsdk sharedsdk].filesmanager uploadfilewithinputstream:inputstream contentlength:contentlength mimetype:nil requestbuilder:builder success:fileblock failure:failureblock progress:nil];

you have create sec phone call after file uploaded.

ios box-api boxapiv2

No comments:

Post a Comment