objective c - ASIHTTPRequest (ASIS3ObjectRequest) - File not downloaded -


i'm having issue accessing downloaded file. can see downloaded data coming through using didreceivedata delegate method never see file in directory once request finished. also, fwiw i'm requesting .zip file bucket.

-(void)downloadzipfile  {    asis3objectrequest *request = [asis3objectrequest  requestwithbucket:bucket key:keypath];      [request setsecretaccesskey:secretaccesskey];      [request setaccesskey:accesskey];      [request setdelegate:self];      [request setdownloaddestinationpath:[[self documentsdirectory]  stringbyappendingpathcomponent:@"test.zip"]];      [request startsynchronous];  }   - (void)requestfinished:(asihttprequest *)request  {      nserror *error;      nsfilemanager *filemanager = [[nsfilemanager alloc] init];      nslog(@"documents directory: %@", [filemanager  contentsofdirectoryatpath:[self documentsdirectory] error:&error]);     //logging contents of documents directory shows file downloaded not there      [filemanager release];  }   - (nsstring *)documentsdirectory {     nsarray *paths = nssearchpathfordirectoriesindomains(nsdocumentdirectory,                                                          nsuserdomainmask, yes);     return [paths objectatindex:0]; }  

any appreciated.

ah found problem.

first if you're writing data disk using downloaddestinationpath must remove didreceivedata delegate method implementation. make sure set temporarydownloadpath.


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -