Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-157734

pdfs are downloading instead of preview with directory indexing on

Details

    Description

      Steps to reproduce:

      1. Start the bundle and log in as admin
      2. Navigate to Control Panel > Sites, create a new site, name it ‘test site’
      3. In site settings under Documents and media, enable directory indexing, then save
      4. Navigate to Site menu > Content and Data > Documents and media
      5. Create a folder, name it ‘test’
      6. Upload a jpg and a pdf file in ‘test’ folder
      7. From document information, copy the latest URL(see attached picture LPP-45805)
      8. Navigate to Site builder > Pages, create a new page, name it test page
      9. Add an html fragment to ‘test page’ and enter edit mode
      10. Add the following code: (Change the folder paths and IDs in the href tags to the ones from your setup, but keep the below format. The IDs we need are in the latest URL.)
      <a href="/documents/test-site/test/dummy.pdf">test link pdf 1</a>
      <br>
      <a href="/documents/37824/37831/dummy.pdf">test link pdf 2</a>
      <br>
      <a href="/documents/test-site/test/testpicture.jpg">test link picture 1</a>
      <br>
      <a href="/documents/37824/37831/testpicture.jpg/">test link picture 2</a>
      

       

      Expected result: When a user clicks on the link, it opens a preview
       
      Actual result: When the link is a friendly URL of the file path, it downloads instead of the preview (see attached video for better understanding LPP-45805)

       When links used in web content, they always open as preview. See on the video attached.  LPP-45805

       On master the JPG downloads, the PDF does not load at all with friendly URLs.
       
      Reproduced on:
       7.3.x

       master

      Attachments

        Activity

          People

            austin.chiang Austin Chiang
            eva.budai Eva Budai
            Kiyoshi Lee Kiyoshi Lee
            Eva Budai Eva Budai
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 weeks, 6 days ago

              Packages

                Version Package
                7.3.X
                7.4.3.35 CE GA35
                Master