Archived from the Transloadit support forum. Originally posted on January 18, 2012; details may be outdated, see our docs for current behavior. Original thread
Hey TransloadIt folks,
The iPhone SDK wasn’t really cutting it for my purposes so I added a feature and did some clean-up / reorganization based on some of my frustrations in getting the SDK up and running (particularly within XCode 4). I hope this helps others in a similar predicament:
https://github.com/thisandagain/iphone-sdk
The added feature is a public method called “addRawData” which is used to “pipe” NSData directly to the ASIFormDataRequest. My use case was trying to send audio data and image data (directly from an NSImage) to TransloadIt. An example:
UIImage *myImage = [UIImage imageNamed:@"example.png"];
[transcoder setTemplateId:@"templateidgoeshere"];
[transcoder addRawData:UIImageJPEGRepresentation(myImage, 0.9f) withFileName:@"iphone_image.jpg" addContentType:@"image/jpeg"];
[transcoder startAsynchronous];
Pull request
https://github.com/transloadit/iphone-sdk/pull/3