Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-36899

Option to Disable Preview of Specific Attachments (PDF, Excel, Word)

    • 12
    • 37
    • We collect Confluence feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.

      In Confluence 5.7 and later version, we have the bundled Confluence Previews add-on, which is responsible for creating the preview for the attachments in the instance.

      By disabling this add-on, Confluence will not provide the option to preview any file and instead of it, for attachments like PDF, Word, Excel, it will download the file. However, for the images, no option will be provided. Neither to download it or to preview.

      This is a feature request to provide an option (or a new module in the add-on) to disable the preview only for specific attachments such as Word, PDF, Excel and the images will still be able to be previewed.

      PS: We do have options to disable only the preview for PDF with the following modules:

      Confluence Previews PDF webworker resource(confluence-previews-pdf-worker)
      Confluence Previews Resources for pdf viewer(confluence-previews-pdf)

      However, both will make the preview be displayed, but, the PDF file will keep loading and will not display the file at all, which is not the same behaviour as requested in this one.

            [CONFSERVER-36899] Option to Disable Preview of Specific Attachments (PDF, Excel, Word)

            1, we really need a way to disable previews of attachments like .doc only, not everything (or a alternative).

            Michael Hajjar added a comment - 1, we really need a way to disable previews of attachments like .doc only, not everything (or a alternative).

            +1

            Our HR department started publishing orga charts in a specific Confluence space. Now users miss a search feature within the preview of PDF documents.

            Brüse, Bernhard added a comment - +1 Our HR department started publishing orga charts in a specific Confluence space. Now users miss a search feature within the preview of PDF documents.

            "Similar as @ShelleyDee, I was also confused with the navigation of the new viewer. The arrows < and > open the next document, while I expected it to turn to the next page (I was viewing a powerpoint slideset). 
            It took me some time to find out that I have to use the scrollbar to get to the next page. In case of a powerpoint, this is unusual. 
            I think therefore, that the < and > arrows are more confusing than helpful."

            + one for this. All the users complaining this to be confusing UX

            Arto Kovalainen added a comment - "Similar as @ShelleyDee, I was also confused with the navigation of the new viewer. The arrows < and > open the next document, while I expected it to turn to the next page (I was viewing a powerpoint slideset).  It took me some time to find out that I have to use the scrollbar to get to the next page. In case of a powerpoint, this is unusual.  I think therefore, that the < and > arrows are more confusing than helpful." + one for this. All the users complaining this to be confusing UX

            Adam Barnes (Inactive) added a comment - - edited

            Hi c.daehn, you linked to the Cloud issue, the Server one CONFSERVER-45382: PDF Preview should have inline document search has no interest in the past year and was Closed. However, CONFSERVER-40333: Able to use Ctrl/Cmd+f to search for strings/words in attachment preview is what I believe you may be looking for. Whilst there is not find feature built into the previewer, it is still possible to use the browsers find function (via the menu).

            It would appreciated if you explain your situation. Have you disabled the Preview plug-in, and if so why?

            Adam Barnes (Inactive) added a comment - - edited Hi c.daehn , you linked to the Cloud issue, the Server one CONFSERVER-45382: PDF Preview should have inline document search has no interest in the past year and was Closed. However, CONFSERVER-40333: Able to use Ctrl/Cmd+f to search for strings/words in attachment preview is what I believe you may be looking for. Whilst there is not find feature built into the previewer, it is still possible to use the browsers find function (via the menu). It would appreciated if you explain your situation. Have you disabled the Preview plug-in, and if so why?

            Duplicate: CONFCLOUD-45382

            Christian Dähn added a comment - Duplicate: CONFCLOUD-45382

            @Adam:
            Since 5.10 a bunch of new issue tickets were opened and thousands of users are affected (see the comments with customers with 4.000 users, we have 500+ users etc.) by a big design error - the new preview introduced a really big usability issue - or a bug. Just declaring it as "not soo bad" and "maybe in a year or more we could think about..." is a punch into the face of each paying customer.

            So: What has to happen that Atlassian will fix this big and in several tickets and user complaints covered usability issue - which will cause big pain for Confluence users each single working day?

            Christian Dähn added a comment - @Adam: Since 5.10 a bunch of new issue tickets were opened and thousands of users are affected (see the comments with customers with 4.000 users, we have 500+ users etc.) by a big design error - the new preview introduced a really big usability issue - or a bug. Just declaring it as "not soo bad" and "maybe in a year or more we could think about..." is a punch into the face of each paying customer. So: What has to happen that Atlassian will fix this big and in several tickets and user complaints covered usability issue - which will cause big pain for Confluence users each single working day?

            Thanks for your interest in this issue.

            While this suggestion has gathered significant interest, we're unable to implement all of the excellent suggestions you make. We appreciate the benefits of such requests, but don't plan to work on this for the foreseeable future.

            This suggestion will be reviewed in about 12 months time, at which point we’ll consider whether we need to alter its status.

            Cheers,

            Confluence Product Management

            Adam Barnes (Inactive) added a comment - Thanks for your interest in this issue. While this suggestion has gathered significant interest, we're unable to implement all of the excellent suggestions you make. We appreciate the benefits of such requests, but don't plan to work on this for the foreseeable future. This suggestion will be reviewed in about 12 months time, at which point we’ll consider whether we need to alter its status. Cheers, Confluence Product Management

            I had some success as far as I can investigate for the moment.
            On our QA system I did the following:

            In the General Configuration in "Look and Feel" in "Custom HTML" in the area "At end of the HEAD" I added a view lines of JavaScript code (jQuery):

            <script type="text/javascript">
            AJS.toInit(function() {
            jQuery("a").removeAttr("data-linked-resource-type");
            });
            </script>
            

            After that the file link is offering open in application / download, no more preview.

            Clicking on an image the preview is showing the large version of the image like before.

            Reason: Images are not linked by an anchor tag around. jQuery does only impact the a Tag, not the img Tag. So here the preview works.

            Stefan Baader added a comment - I had some success as far as I can investigate for the moment. On our QA system I did the following: In the General Configuration in "Look and Feel" in "Custom HTML" in the area "At end of the HEAD" I added a view lines of JavaScript code (jQuery): <script type= "text/javascript" > AJS.toInit(function() { jQuery( "a" ).removeAttr( "data-linked-resource-type" ); }); </script> After that the file link is offering open in application / download, no more preview. Clicking on an image the preview is showing the large version of the image like before. Reason: Images are not linked by an anchor tag around. jQuery does only impact the a Tag, not the img Tag. So here the preview works.

            I  tested a bit around with such a file download link.

            Using the Confluence 5.10 default the HTML code in the page is like this:

            <a href="/download/attachments/24281097/test.pptx?version=1&amp;modificationDate=1504962236837&amp;api=v2" data-linked-resource-id="24281098" data-linked-resource-version="1" data-linked-resource-type="attachment" data-linked-resource-default-alias="test.pptx" data-nice-type="PowerPoint Presentation" data-linked-resource-content-type="application/vnd.openxmlformats-officedocument.presentationml.presentation" data-linked-resource-container-id="24281097" data-linked-resource-container-version="5">test.pptx</a>
            

            The click on that link is opening the preview of that file. I want to check out how to eliminate that behaviour.

            I created a user macro with exact this code and the behaviour is exact like before (as expected).

            I started to take out some of the attributes and found out, that the following attribute seems to be responsible for the preview:

            data-linked-resource-type="attachment" 

            My user macro with the following HTML code is just offering the download of the file:

            <a href="/download/attachments/24281097/test.pptx?version=1&amp;modificationDate=1504962236837&amp;api=v2" data-linked-resource-id="24281098" data-linked-resource-version="1"  data-linked-resource-default-alias="test.pptx" data-nice-type="PowerPoint Presentation" data-linked-resource-content-type="application/vnd.openxmlformats-officedocument.presentationml.presentation" data-linked-resource-container-id="24281097" data-linked-resource-container-version="5">test.pptx</a>
            

            What I want to try: writing a jQuery script to take out that attribute when no image is used. 

            I will let you know if that is successful.

            Stefan Baader added a comment - I  tested a bit around with such a file download link. Using the Confluence 5.10 default the HTML code in the page is like this: <a href= "/download/attachments/24281097/test.pptx?version=1&amp;modificationDate=1504962236837&amp;api=v2" data-linked-resource-id= "24281098" data-linked-resource-version= "1" data-linked-resource-type= "attachment" data-linked-resource- default -alias= "test.pptx" data-nice-type= "PowerPoint Presentation" data-linked-resource-content-type= "application/vnd.openxmlformats-officedocument.presentationml.presentation" data-linked-resource-container-id= "24281097" data-linked-resource-container-version= "5" >test.pptx</a> The click on that link is opening the preview of that file. I want to check out how to eliminate that behaviour. I created a user macro with exact this code and the behaviour is exact like before (as expected). I started to take out some of the attributes and found out, that the following attribute seems to be responsible for the preview: data-linked-resource-type="attachment"  My user macro with the following HTML code is just offering the download of the file: <a href= "/download/attachments/24281097/test.pptx?version=1&amp;modificationDate=1504962236837&amp;api=v2" data-linked-resource-id= "24281098" data-linked-resource-version= "1"   data-linked-resource- default -alias= "test.pptx" data-nice-type= "PowerPoint Presentation" data-linked-resource-content-type= "application/vnd.openxmlformats-officedocument.presentationml.presentation" data-linked-resource-container-id= "24281097" data-linked-resource-container-version= "5" >test.pptx</a> What I want to try: writing a jQuery script to take out that attribute when no image is used.  I will let you know if that is successful.

            As a confluence user, not an administrator, I would prefer to have an option to disable the previewer in my user preferences, which would work independent of the administrator's decisions.

            Juergen Schwarz added a comment - As a confluence user, not an administrator, I would prefer to have an option to disable the previewer in my user preferences, which would work independent of the administrator's decisions.

              Unassigned Unassigned
              gdecampos Giuliano C.
              Votes:
              246 Vote for this issue
              Watchers:
              160 Start watching this issue

                Created:
                Updated: