打开/保存dilog框未打开图像 [英] open/save dilog box is not opening for image
本文介绍了打开/保存dilog框未打开图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的先生
在我的项目中,我正在从在线路径下载文档.
在图像或记事本文件(.txt
)时,它将直接在新窗口中打开,
我想要同一个对话框来下载图像
Ankita Mali
Dear sir
In my project I am downloding documents from online path.
at the time of image or notepad file(.txt
) it is directly open in new window,
i want same dilog box to download the image
Ankita Mali
推荐答案
要强制下载已知的MIME类型,在您的情况下为&文本.您需要使用服务器端编程来渲染它,并修改content-type标头.这将强制浏览器下载文件.
检查以下文章
从网页创建和下载文本文件 [
To force the download of a known MIME type, in your case image & text. You need to render it using server side programming and modify the content-type header. This will force the browser to download the file.
Check following article
Create and download text file from a web page[^]
这篇关于打开/保存dilog框未打开图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文