Confluence on cloud. About attachments in a page. Attached file is a MS Word doc that is displayed on the page using "attachment" macro. When one clicks on the file name link on the page, tthe file is downloaded. Expected intuitive default behaviour should be that the file is opened for viewing. Can we make that happen?
(Note: One can click on the arrow by side and choose view option. Edited the description for clarity and context.)
If you are on Confluence Server or Data Center you could create a user macro that you can drop onto your page that will change the file links in the attachments macro to preview the document instead of downloading it. Here is the user macro.
This will change the links in the attachments macro to preview the attachment instead of downloading it.
Macro Body Processing:
No macro body
I attached a file and then used attachment macro to show that file on the page. I can now get to the file using the attachment icon at the top or by clicking on the file name in the page. When I click on the file name, it gets downloaded. I wish to change the behavior to "view" when I click the file. Following is the screen shot of the page.
I'm interested in the same thing. Links to attached files are displayed at various places, where the View option is not available at all.
For example on the "Labelled content" page, in Search results, etc.
(We are moving all our previous requirements into Confluence now, as attachments. Conversion one by one was really painful, I did it for a dozen, then decided against it.)
I've used the macro preview_attachments it works within the same page where the files are in.
However we like to use one page with a filelist as a central page to store documents including labels. Other pages are using as much as possible dynamic macro's e.g. content per label. Using the macro preview_attachments before a macro content by label still download the file instead of give a preview.
Did I do something wrong or does the preview_attachment not work in combination with other macro's
Two vulnerabilities have been published for Confluence Server and Data Center recently: March 20, 2019 CVE-2019-3395 / CVE-2019-3396 April 17, 2019 CVE-2019-3398 The goal of this article is...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs