views:

73

answers:

1

Hi,

I am newbie iphone developer, I am using JSON to send and retrieve data from server. But I used to work with text between iPhone and server. Now I would like to send image data from iPhone to server and vice versa, retrieve image data from server database to iphone. Can anyone show me how I can accomplish this?

Thanks

+2  A: 

Encode your image with base64, then send the base64 string as json. On the serverside decode the base64 again and save it or do whatever you want with it

Tseng
And first compress it as JPEG or PNG data to get good performance.
Codo