2014-05-08 56 views
1

我的网站在SharePoint 2010
在我的测试网站开发,
<a href="file.pdf" target="_blank">Download File</a>如何打开保存对话框,而不是在文件浏览器中获取打开我的SharePoint网站

当点击该标签上面,文件中直接打开了browswer(IE/Chrome浏览器/ Firefox)的

但相同的标签在我的直播站点中使用它要求保存文件(IE)或会下载(在Chrome)。

+0

你检查这http://www.mydigitallife.info/disable-pdf-from-opening-in-web-browser-ie-firefox-opera-safari/ –

回答

0

对于文件使用标准SharePoint download.aspx页面上的链接。

<a href="http://yourSite/_layouts/download.aspx?SourceUrl=http://pathToFile" target="_blank">Download File</a> 

Download.aspx会看到你发送的SourceUrl文件的内容,并使其返回到你的HTTP响应。

希望帮助

+0

它的工作。非常感谢:) – Yayati

+0

不要忘记添加过滤器downliad.aspx或任何人都可以得到其他文件! ;) – Pogrindis

相关问题