I have a webservice call that will return an image, now I want to save this image to the filesystem in the server.
The problem is, I cannot make the webservice call from the server, as the webservice application runs on each user machine and a request is made to the service as http://localhost/get_image, which returns the image.
How do I save this image on the server?
You can use HTML5 to load image using javascript and send base64 encoded response to sever where you can decode the response and write image to a file. Here is the approach
Ensure that the webservice response headers has “Access-Control-Allow-Origin: *” to allow cross origin resource sharing
Jquery code