0

I have a code who send to the server in method POST a NSData (From an UIImage), When the server arrives at NSData she comes in the following way:

<6f732070 726f6475 746f7320 636f6d70   ........... 7261646f 73206465 73746520 72656369 626f2e0a>

Now I want to know if is possible to get this string (NSData), and convert again to a image, this is possible?

user3781174
  • 245
  • 5
  • 16

2 Answers2

0

NSData is not a string. It is an NSObject. PHP cannot decode these objects. I would recommend sending it as an image instead of overcomplicating things.

taco
  • 1,367
  • 17
  • 32
0

Try answers given in following stackoverflow questions on how to upload image using ios.

  1. ios Upload Image and Text using HTTP POST
  2. Upload image to the PHP server from iOS
  3. Objective C: How to upload image and text using HTTP POST?
Community
  • 1
  • 1
uiroshan
  • 5,021
  • 2
  • 39
  • 37