How I can add an attachment without onclick preview (direct download)

I'm using Confluence 5.7. I add an attachment to page. Users want to download it with one click but they see black full screen preview (empty because of file type) with tiny download button in upper right corner. It's okay for images but only for them.

I see the same problem in Atlassian documentation pages with Confluence 5.8.

4 answers

1 accepted

Hi, 

This seems to be a new "Feature" of Confluence 5.7.  All attachments are previewed before downloading - even if previewing doesn't make sense.  Here's the Bug/Features request:  https://jira.atlassian.com/browse/CONF-36632

I don't like any of the workarounds as they take a lot of work to implement, and then just as much if not more to maintain and remove when Confluence starts to behave nicely again (regarding this aspect).  My workaround is a macro to create a direct download link.  At present, it's just the macro to create the link.  When confluence allows direct downloads, I'd like to write a second macro to perform a search and replace to get rid of the workaround and put link into the correct syntax again.

https://bitbucket.org/selberg/download-attachment

-Scott

Thank you too, Scott. Works like a charm. 

Best

Matin

Nice work, Scott.
Would it be possible to add a link on an image with this add-on?

Regards,
Kirstin

 

Hallo Evgeniy,

what kind of content causes this? How do you embed the link to the attachment to your Confluence page?

We have images on our Confluence page that are linking to ZIP files. Clicking an image results in a direct download.

Cheers,
Kirstin

Edit page -> Files (on top menu) -> Attachment to this page -> Upload files (upload my zip file) -> Insert. After these actions I've got the file link (or thumbnail, it's works the same) which shows preview popup on click. How you make an image with attachment and direct download? Do you use confluence 5.7? It's started in latest versions.

We' re still using Confluence 5.5.2. No time to upgrade yet. :) To create an image with a link, add the desired image to the page. Then click the image and select "Link" from the context menu. You can add a link to the attachment there. The procedure you described seems to be Confluence 5.7 specific. I'm missing the Files menu in Confluence 5.5.2.

Images also shows preview. It's new feature (bug) in confluence. Atlassian themselves have the same problem on confluence.atlassian.com For example this csv file: https://confluence.atlassian.com/display/CROWD/Importing+Users+from+CSV+Files?preview=/64454760/65634312/example_users_file.csv

Another nice "feature" which you neither can configure nor can disable.

I like the features but as Admin you'd be able at least to disable them without modifying the source code .

Hi all, just to let you know: This is a feature request in https://jira.atlassian.com/browse/CONF-36736 

Best

Matin

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,784 views 26 10
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you