Monday, 3 August 2020

How to open pdf in browser instead of downloading in sitecore site

 I am using the below patch configuration file for Sitecore 9x and SXA 1.8 to stop the download of PDF files. It works fine for me

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <!-- Force download of PDF files -->
    <mediaLibrary>
      <mediaTypes>
        <mediaType name="PDF file" extensions="pdf">
          <forceDownload>false</forceDownload>
        </mediaType>
      </mediaTypes>
    </mediaLibrary>
  </sitecore>
</configuration>

Extracting Nupkg files using command line

Rename it to zip first then extract files as below 1.     Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2.     Make sure to repla...