I have uploaded a .DOCX file to SharePoint 2010. The document is a legal memo that has a bunch of citations; I have hyperlinked the citations to PDF files that are also saved in SharePoint.
When selected, some of these files open up in the browser automatically; others will prompt the user to download the files to a local drive. The only difference appears to be the fact that some of these were linked by someone else in the original draft of the memo to files in folder X on SharePoint. The ones that I linked and uploaded today are the ones that are not opening up in the browser. Otherwise, I don't see any difference in the links. I've checked the settings, and both folders appear to be the same. All of the files are PDFs.
Any suggestions on what I'm doing wrong here? For the sake of convenience for the people who are going to look at this doc in future, I'd like these to open up in the browser....but I'd also just like to know what the issue is.
Thanks.
Check when you download those files if they have the header "X-Download-Options: noopen"
If so then it is a sharepoint security feature and you can either disable it as per this blog post:
Option 1 - Don't use in Production
A web application has a setting in Central Administration called "Browser File Handling", which offers two settings: Permissive and Strict. setting to permissive will fix it, obviously this carry risks so do not use in a production environment.
Option 2 - Better way:
With a little PowerShell we can easily add the PDF MIME type to the web application's AllowedInlineDownloadMimeTypes property:
$webApp = Get-SPWebApplication("http://yourwebappurl")
$webApp.AllowedInlineDownloadedMimeTypes.Add("application/pdf")
$webApp.Update()