Streaming a file as it gets written?
Streaming a file as it gets written?
- Subject: Streaming a file as it gets written?
- From: "ben levitt" <email@hidden>
- Date: Fri, 4 Jan 2008 13:46:40 -0800
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];
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden