title: asihttprequest Image download
body: <p>Hello good morning everyone. I am using asihttprequest for a series of images download - 4 images from server.However i noticed an issues and cannot find a solution. Suppose i am downloading 4 images via URL and in case any one or 2 of the images is not available it cancels the whole queue.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>    [networkQueue setDownloadProgressDelegate:progressIndicator];
      [networkQueue setRequestDidFinishSelector:@selector(imageFetchComplete:)];
      [networkQueue setRequestDidFailSelector:@selector(imageFetchFailed:)];
  
      request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://imagees/image1.jpg"]];
      [request setDownloadDestinationPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"1.png"]];
      [request setDownloadProgressDelegate:imageProgressIndicator1];
      [request setUserInfo:[NSDictionary dictionaryWithObject:@"request1" forKey:@"name"]];
      [networkQueue addOperation:request];
  
      request = [[[ASIHTTPRequest alloc] initWithURL:[NSURL URLWithString:@"sdvdsvsadvsadv"]] autorelease];
      [request setDownloadDestinationPath:[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"] stringByAppendingPathComponent:@"2.png"]];
      [request setDownloadProgressDelegate:imageProgressIndicator2];
      [request setUserInfo:[NSDictionary dictionaryWithObject:@"request2" forKey:@"name"]];
      [networkQueue addOperation:request];
  
  - (void)imageFetchComplete:(ASIHTTPRequest *)request
  {
      UIImage *img = [UIImage imageWithContentsOfFile:[request downloadDestinationPath]];
      if (img) {
          if ([imageView1 image]) {
              if ([imageView2 image]) {
                  [imageView3 setImage:img];
              } else {
                  [imageView2 setImage:img];
              }
          } else {
              [imageView1 setImage:img];
          }
      }
  }
  
  - (void)imageFetchFailed:(ASIHTTPRequest *)request
  {
      if (!failed) {
          if ([[request error] domain] != NetworkRequestErrorDomain || [[request error] code] != ASIRequestCancelledErrorType) {
              UIAlertView *alertView = [[[UIAlertView alloc] initWithTitle:@"Download failed" message:@"Failed to download images" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
              [alertView show];
          }
          failed = YES;
      }
  }
  </code></pre>
  
  <p>The problem is that suppose fetching second image failed, it displays the error message and stops the whole operation, although image 1 is a valid image file.</p>
  
  <p>Any help will be greatly appreciated.</p>
  
  <p>:)</p>