• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Streaming a file as it gets written?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: iChat-Theater not working from Cocoa apps
  • Next by Date: Mouse tracking in CALayer
  • Previous by thread: Re: iChat-Theater not working from Cocoa apps
  • Next by thread: Mouse tracking in CALayer
  • Index(es):
    • Date
    • Thread