iPhone: How to Embed NSData in XML for Upload to Server?

Posted by milanjansari on Stack Overflow See other posts from Stack Overflow or by milanjansari
Published on 2010-03-19T13:27:20Z Indexed on 2010/03/19 14:31 UTC
Read the original article Hit count: 300

Filed under:
|

Hello,

I want to pass data to a server and store the file there in a database as binary data.

NSData *myData = [NSData dataWithContentsOfFile:pathDoc]; 
pathDoc = [NSString stringWithFormat:@"<size>%d</size><type>%d</type><cdate>%@</cdate><file>%c</file><fname>File</fname>",fileSizeVal,filetype,creationDate,myData];

Any idea about this?

Thanks you, Milan

© Stack Overflow or respective owner

Related posts about iphone

Related posts about nsdata