Skip navigation.
 
mlStreaming a file as it gets written?
FROM : ben levitt
DATE : Fri Jan 04 22:46:40 2008

I'm trying to


NSURL *cgiUrl = [NSURL
URLWithString:@"http://api-dev.melodis.com/mobile/search/sing"];
NSMutableURLRequest *postRequest = [NSMutableURLRequest requestWithURL:cgiUrl];

//setting the headers:
[postRequest setHTTPMethod:@"POST"];
[postRequest addValue: @"application/octet-stream" forHTTPHeaderField:
@"Content-Type"];

//adding the body:
fileStream = [[NSInputStream inputStreamWithFileAtPath:
@"/tmp/midomi.amr"] retain];
[postRequest setHTTPBodyStream: fileStream];

// Make the request
NSURLConnection *theConnection=[[NSURLConnection alloc]
initWithRequest:postRequest:  delegate:self];

Related mailsAuthorDate
No related mails found.