PDF Document won’t have “Open” option when accessing from Share point Doc Library from Internet Explorer 8


Users when they try to open PDF file from Internet Explorer 8, they won’t have the button  “Open”.
Internet Explorer 8 treats the web applications that need to serve untrusted HTML files, the user is prevented from opening a file download directly; instead, they must first save the file locally. When the locally saved file is later opened, it no longer executes in the security context of your site, helping to prevent script injection.

 
Internet Explorer 8 has a mechanism to help prevent the untrusted content from compromising your site’s security. When the new X-Download-Options header is present with the value noopen.


To overcome, we need to allow the Content Type “application/pdf”, using the Powershell Scripts with the Webapplication.
                                     

$WebApp = Get-SPWebApplication $(Read-Host "`nEnter Web Application URL")
If ($WebApp.AllowedInlineDownloadedMimeTypes -notcontains ("application/pdf"))
{
Write-Host -ForegroundColor White `n"Adding" $MimeType "MIME Type to defined Web Application"$WebApp.url
$WebApp.AllowedInlineDownloadedMimeTypes.Add($MimeType)
$WebApp.Update()
Write-Host -ForegroundColor Green `n"The" $MimeType "MIME type has been successfully added."
} Else {
Write-Host -ForegroundColor Red `n"The" $MimeType "MIME type has already been added."
}


(Or)

$webapp = Get-SPWebApplication "http://sharepointsitename.com"

$webapp.AllowedInlineDownloadedMimeTypes.Add ("application/pdf")

$webapp.Update ()


After executing the scripts, it  will have the open button.


 Regards,
Ratsub

Comments

Popular posts from this blog

Secure When a HTTP request is received Power Automate a.k.a MS Flow

People picker Control in PowerApps

Upload attachment to SharePoint list item using Microsoft Flow

Approval and auto escalation with time out in Microsoft Flow

Modern page provisioning using page template

Headless-Daemon calling AAD secured API

Developing custom reusable components in PowerApps

Step-By-Step Azure AD App Registration

HTML field & Date Time formatting in powerapps

Create and configure custom connectors for PowerApps and MSFlow from AzureFunctions