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

Ability to view html attachments in-line (instead of download) needs to be a preference

    • 1
    • 2
    • 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.

      As of version 2.2.8, Confluence no longer sends html attachments as text/html, instead always setting them to be application/x-download.
      This change is described in http://jira.atlassian.com/browse/CONF-389

      This feature needs to be a preference in the administrative screens that can be switched on/off. Right now the only way to turn it off is by modifying the Confluence source code.

      This turned out to be a big deal for our users. Within two days of the upgrade we got three customers complaining that they can no longer view the attachments in-line.

            [CONFSERVER-8182] Ability to view html attachments in-line (instead of download) needs to be a preference

            John Cunliffe added a comment - - edited

            I found a kind-of work-arround:

            • activate html-include macro
            • insert the html-include macro on the page you want the attachment to display
            • paste the download link as URL
            • for attachments from internal pages, attach &os_authType=basic&os_username=username&os_password=password

            This will download the attachment server-side and paste it inside your confluence page. Unfortunately this does not seem to include javascript.

            John Cunliffe added a comment - - edited I found a kind-of work-arround: activate html-include macro insert the html-include macro on the page you want the attachment to display paste the download link as URL for attachments from internal pages, attach &os_authType=basic&os_username=username&os_password=password This will download the attachment server-side and paste it inside your confluence page. Unfortunately this does not seem to include javascript.

            This is sooo easy to fix... Please do.
            You can fix it in different ways e.g.
            -change the mime type ot be directly displayable in the browser
            -Adapt html-include macro to be able to refer to attachments
            Extend the View File Macro < preferred way
            -....

            Siegfried De Bleeckere added a comment - This is sooo easy to fix... Please do. You can fix it in different ways e.g. -change the mime type ot be directly displayable in the browser -Adapt html-include macro to be able to refer to attachments Extend the View File Macro < preferred way -....

            We have also come across this issue now, and it has been confirmed by a support technician that even if the MIME type of an attachment is set to text/html, confluence serves the file as application/x-download. He also confirmed that this is still the case in the current version 5.1

            Andreas Holzer added a comment - We have also come across this issue now, and it has been confirmed by a support technician that even if the MIME type of an attachment is set to text/html, confluence serves the file as application/x-download. He also confirmed that this is still the case in the current version 5.1

            my suggestion would be to add a "View" link on the attachment page, similar to the Office file types, so the user could click this link to download the html file using text/html mime type instead of enforcing application/x-download.

            Hans-Peter Geier added a comment - my suggestion would be to add a "View" link on the attachment page, similar to the Office file types, so the user could click this link to download the html file using text/html mime type instead of enforcing application/x-download.

            I just ran across this issue myself and would like to ask for a resolution.

            Hans-Peter Geier added a comment - I just ran across this issue myself and would like to ask for a resolution.

            Paul Beer added a comment -

            Is there a workaround for this? There must be if this is so old and nothing was done...

            Paul Beer added a comment - Is there a workaround for this? There must be if this is so old and nothing was done...

            http://jira.atlassian.com/browse/CONF-389 just yields a "permission violation" to me... We are also having users complain that when they add HTML attachments it comes in as a download instead of just coming up like other content types. Has anyone figured out a good workaround in the... 3 years since this has been reported???

            Ernest Mueller added a comment - http://jira.atlassian.com/browse/CONF-389 just yields a "permission violation" to me... We are also having users complain that when they add HTML attachments it comes in as a download instead of just coming up like other content types. Has anyone figured out a good workaround in the... 3 years since this has been reported???

            suedti added a comment -

            Can somebody tell me which changes have to done in source to get a inline HTML view?
            Or are any other workarounds or plugins around in the meantime?

            suedti added a comment - Can somebody tell me which changes have to done in source to get a inline HTML view? Or are any other workarounds or plugins around in the meantime?

            Rather than adding a preference, which seems it might require several changes, and might be hard to configure on a per-page basis, perhaps the following workarounds would be easier:

            0. Provide a way to get a permanent URL that refers directly to an attachment.

            1. Provide for /attachment URL segments to be understood by the /display verb.

            2. (optionally) add ^^ as the syntax for generating a /display/attachment/... URL instead of a /download/attachment/... URL.

            Just doing (0) would allow users to insert an explicit link to the attachment. Doing (1) would allow for this URL to be predictable (a la the %ATTACHURL% mechanism of many Wikis). Doing (2) would make it trivial to insert these links.

            Dan Brotsky added a comment - Rather than adding a preference, which seems it might require several changes, and might be hard to configure on a per-page basis, perhaps the following workarounds would be easier: 0. Provide a way to get a permanent URL that refers directly to an attachment. 1. Provide for /attachment URL segments to be understood by the /display verb. 2. (optionally) add ^^ as the syntax for generating a /display/attachment/... URL instead of a /download/attachment/... URL. Just doing (0) would allow users to insert an explicit link to the attachment. Doing (1) would allow for this URL to be predictable (a la the %ATTACHURL% mechanism of many Wikis). Doing (2) would make it trivial to insert these links.

              Unassigned Unassigned
              2b40c57d5a02 Leo Haskin
              Votes:
              54 Vote for this issue
              Watchers:
              28 Start watching this issue

                Created:
                Updated: