0

I am developing an iphone application which needs to upload some image files to server.The images needs to be uploaded as binary data.I converted the image to NSData using [NSData dataWithContentsOfFile:filepath];

But i dont know how to convert this NSData to Binary data.Looking for a solution

Thanks,

MobX
  • 2,640
  • 7
  • 33
  • 54

2 Answers2

0

Try base64 encoding of the binary data. Convert your NSData object to base 64 using QSStrings. See this question

Community
  • 1
  • 1
primulaveris
  • 966
  • 14
  • 20
0

I recommend that you use ASIHTTPRequest

Read the How-to-use section http://allseeing-i.com/ASIHTTPRequest/How-to-use There are some examples of sending files and NSData

epatel
  • 45,805
  • 17
  • 110
  • 144