This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// no claim or warranty is made on this code | |
// it is very brute force | |
using System; | |
using System.Collections; | |
using System.IO; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Collections.Generic; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
NewerOlder