PDA

View Full Version : Image Mime type is not being redirected to Save/Open dialog box



raj542
20 Nov 2013, 1:36 AM
Hi all,

I am using Rest-API along with Extjs, i have a link to download file types in my application, if the file type is doc or xls, other than Image(Image/jpeg mime-type) i wil get Save/Open dialog box, But for Image(Image/jpeg mime-type) i am not getting dialog box.

Please help me out in solving this issue

Thanks,
Raj

raj542
20 Nov 2013, 10:28 PM
It has to be done in server side, but still i answer the question. We have to set the content-disposition for the headers.

httpResponse.setContentType("application/x-download");

httpResponse.setHeader("Content-disposition", "attachment; filename=" + filename());

Thanks.