Preview attachment macro
Asked by Matthias Kane:

Hey,

by default Confluence downloads attachements displayed with the attachment macro and opens them with the specific program (exept pdfs in Chrome).

I would like it to open with the preview instead, so the files are not downloaded every time somebody opens it and the users can edit them easier.

Is there a possibility to do that?

Thanks a lot


Answers:
author: Matthias Kane
body: Hey,

thanks for the answers. We are using Conflunece Server in Version 6.11 and 6.12 as Test-Instance and all modules of the preview plugin are activated. Most of the used files are pdfs.

If you click on the file in the attachments macro (as you can see in the picture) it opens up in a new tab in chrome instead of preview.

![attachment macro.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/34506i221047F2F1A629D2/image-size/large?v=v2&px=999 "attachment macro.jpg")

comments: author: AhmadDanial
body: Hello again, Matthias.

You are welcome. After you provided the screen shot, I understood that you are referring to the **Attachments** macro itself. My apologies for the initial misunderstanding.

In this case, I was able to reproduce the scenario on my end, even after I have the **Show previews** configured:

![Screen Shot 2018-10-11 at 07.28.41.png](https://community.atlassian.com/t5/image/serverpage/image-id/34629i4640DE07E5755FC5/image-dimensions/175x316?v=v2 "Screen Shot 2018-10-11 at 07.28.41.png")

Clicking on the attachment on the list either opens it on the same tab (for images) or automatically downloads it (.pdf, .ppt).

Going through the documentation again - [Attachments Macro](https://confluence.atlassian.com/doc/attachments-macro-97911315.html) - I understood that it is the expected behavior because the preview actually is listed **within** the dropdown itself. For example:

![Screen Shot 2018-10-11 at 07.48.55.png](https://community.atlassian.com/t5/image/serverpage/image-id/34636i1C40E698AA1A2129/image-dimensions/501x285?v=v2 "Screen Shot 2018-10-11 at 07.48.55.png")

So, I hope that you are clear with the Attachment macros feature that we have here. If you have any further questions, feel free to share it here.


author: deepak
body: [@AhmadDanial](/t5/user/viewprofilepage/user-id/781639) sorry didnt marked you in my previous comment, please if you can check


author: deepak
body: Hi Ahmad Danial,

Can we see preview of Outlook msg attachment or .png/.jpg on Attachment Page ( where we see Option on right side lik View \| Properties \| Delete

![2019-05-15_12-47-14.png](https://community.atlassian.com/t5/image/serverpage/image-id/54681i41E8FBF6D3A843D8/image-size/large?v=v2&px=999 "2019-05-15_12-47-14.png")


author: AhmadDanial
body: Hello, Matthias.

By default, clicking attachments should render the lightbox preview in Confluence (though it might not apply to some file types as it will take a long time to show the preview / the preview does not show up). Can you please confirm what format of attachment you are actually referring to so I can have this specifically tested on my end?

Additionally, can you confirm if you are using Confluence Cloud / Server?


author: Yoga Reddy {Appfire}
body: Hi Matthias Kane,

We have tested this attachment macro preview option in Confluence V6.8.0 and we are able to see the attachment in preview mode without download.

Confluence will show the attachment in the preview mode. If it is happening with all the attachment, that it is not showing the preview, then please verify if the Confluence Previews plugin under your System add-ons section is enabled and check all the modules are enabled.

Thanks

Yoga


Tags: attachment

preview