Reputation: 2087
My service call returns the image.
It returns the png image and it has content-type in header as image/jpeg , it opens the image in the same page. I want to give the option to the user to save this image to the disk.
Upvotes: 0
Views: 97
Reputation: 11298
Content-Disposition may be inline, specify content-disposition as attachement
response.setContentType("image/jpeg");
response.setHeader("Content-Disposition", "attachment; filename=" + imageName + ".jpg");
Upvotes: 1
Reputation: 7744
You need Content-Disposition
header in server's response
Upvotes: 1