Iphone: ¿Cómo dividir el file de video NSData en trozos y cargar los trozos uno por uno al server?

He estado tratando de dividir el file de video en trozos y enviar los trozos al server uno por uno. ¡Pero no estoy seguro si la lógica o el código que he escrito es correcto! Si pudieras ayudarme con esto.

-(void)multipart:(NSData *)file ; { NSDate *currentTime = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateFormat:@"hh-mm"]; NSString *resultString = [dateFormatter stringFromDate: currentTime]; myDid = [[NSString alloc]initWithString:[[UIDevice currentDevice]uniqueIdentifier]]; upload_Id = [NSString stringWithFormat:@"%@%@", myDid, resultString]; NSLog(@"%@", upload_Id); NSUInteger length = [file length]; NSUInteger chunkSize = 100 * 1024; NSUInteger offset = 0; do { NSUInteger thisChunkSize = length - offset > chunkSize ? chunkSize : length - offset; NSData *chunk = [NSData dataWithBytesNoCopy:(char *)[file bytes] + offset length:thisChunkSize freeWhenDone:YES]; //NSLog(@"%@", chunk); //NSLog(@"%@", thisChunkSize); NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:@"mov", @"uploadExtn", upload_Id, @"uploadId",offset , @"uploadedByte", nil]; NSDictionary *mainDictionary = [[NSDictionary alloc]initWithObjectsAndKeys:@"createContent",@"type",dictionary,@"data", nil]; NSString *mainString = [mainDictionary JSONRepresentation]; offset += thisChunkSize; NSLog(@"%d", offset); //[chunk writeToFile:[self.recordedChunkFile path] atomically:YES]; //NSLog(@"%@", [self.recordedChunkFile path]); //NSString* path = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask,YES) lastObject]; NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@/%@",[[NSUserDefaults standardUserDefaults] objectForKey:DEFAULTS_SET_HTTP_SWITCH],DB_SAVED_SERVER,API_MULTIPART_UPLOAD]]; __block ASIFormDataRequest *request = [ASIFormDataRequest requestWithURL:url]; //[request setFile:[self.recordedChunkFile path] forKey:@"data1"]; // Upload an NSData instance [request setData:chunk withFileName:upload_Id andContentType:@"video/mov" forKey:@"data1"]; [request setPostValue:mainString forKey:@"jsonData"]; } while (offset < length); } 

Gracias