0

I'm currently looking at the best way to upload an image to my existing WCF Json service, the service then saves the image to a folder on the server. Is it as simple as streaming the image? Or is there a different practice if you are using json?

Ultimately ill be sending an image from a mobile device to the service.

Chris Seymour
  • 83,387
  • 30
  • 160
  • 202
MrBeanzy
  • 2,286
  • 3
  • 28
  • 38
  • Try this: http://stackoverflow.com/questions/9451141/uploading-an-image-using-wcf-restful-service-full-working-example/34913111#34913111 – Muhammad Shahzad Jan 21 '16 at 00:14

2 Answers2

1

Found a good code over this place. Have a look. It should cater your need. The code has both client and server implementation

MSDN

Anand
  • 14,545
  • 8
  • 32
  • 44
0

You could use ajaxForm or ajaxSubmit from http://www.malsup.com/jquery/form/ We used it to call an MVC action with our data, but had to use the iframe fallback option due to IE having issues with ajax and file inputs.

For a mobile site I would expect this to be useful. For a mobile app I would expect it to be more a case of streaming the image as you would any other type of file.

Kaido
  • 3,383
  • 24
  • 34