Skip to content

Instantly share code, notes, and snippets.

@jacksonh
Created August 10, 2011 16:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jacksonh/1137318 to your computer and use it in GitHub Desktop.
Save jacksonh/1137318 to your computer and use it in GitHub Desktop.
NSUrl url = new NSUrl (UPLOAD_LOCATION);
NSMutableUrlRequest request = new NSMutableUrlRequest (url);
request.HttpMethod = "POST";
{
// Unfortunately set_HTTPBodyStream isn't implemented in monotouch yet
Selector s = new Selector("setHTTPBodyStream:");
NSInputStream stream = new NSInputStream (random_file_path);
Messaging.void_objc_msgSend_IntPtr (request.Handle, s.Handle, stream.Handle);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment