How to create a repository of documents / media for further use on multiple pages?
Asked by Paul Weber:

I come from a CMS background (Wordpress), where it is easy to upload various media (docs, spreadsheets, pdfs, etc) which can then be simply inserted into pages and posts.

Is there a simple way of doing this in Confluence?

My first attempt has been frustrating as I loaded a bunch of media to one page and then discovered that the other pages could not access the uploads. I have to go to the first "repository" page, go to the attachment page, select each file and manually assign it to one specific page. I'm probably missing something here.

Thank you!


Answers:
author: Aron Gombas _Midori_
body: 1. You can absolutely display files that are attached to another page! See [this tutorial](https://confluence.atlassian.com/doc/display-files-and-images-245827130.html#DisplayFilesandImages-FromAnotherPageInsertafileattachedtoanotherpage).

2. Plus, you can display the attachments of another page using the [Attachments Macro](https://confluence.atlassian.com/doc/attachments-macro-97911315.html).

I think these should solve your use case.

comments: author: Paul Weber
body: Thank you! Will be giving this a try asap!


author: Paul Weber
body: [@Aron Gombas _Midori_](/t5/user/viewprofilepage/user-id/502447)From the Tutorial: *"if you know the name of the file. "*That is the first issue. We've uploaded scores of files, I should remember the name of files with names such as

2017_example_of_this_file_name_just_an_example.pdf

So the first technique unfortunately fails my/our needs.

Attachments Macro: doesn't seem to work. Are there any general settings that must be associated with my profile for example?


author: Aron Gombas _Midori_
body: What does that mean "doesn't seem to work"?

I don't think you need any extra setting or such. If you have access to the page that is the owner of the attachments, then you should be able to execute the Attachments macro to retrive its attachments.


author: Paul Weber
body: Thank you for your reply and apologies for not being exact in my previous response. I should have written "nothing happens", i.e. I get an empty page.

I've defined all the types of files I need to publish, in both ways (i.e. \*.pdf and .\*pdf, etc). For brevity purpose I've labeled them all "sales_uploads", which is the label I've inserted in the macro.The result is a blank, empty page, hence my question about the permissions. (see attached screenshot, after having clicked on the "refresh" icon)

Note: all the files were uploaded by me, through my own user session, so in theory I should be able to index and find them (I hope that my colleagues will be able to see them as well, but we'll leave that problem for later)

![Screen Shot 2018-03-12 at 09.38.16.png](https://community.atlassian.com/t5/image/serverpage/image-id/16869iA8672494B1020146/image-size/large?v=v2&px=999 "Screen Shot 2018-03-12 at 09.38.16.png")


author: Andy Folland
body: Hi Paul,  

Hopefully not too late to reply here.  
Having quickly skimmed this, here's my response:  
Since you have labelled your attachments, have a look at the "content by label" macro.  
That might do it.  

Cheers,  

<br />

<br />

Andy


author: JanR
body: The Attachment macro only displays attachments of the page it is embedded in by default. Just to make sure: Did you select the repository page containing the files in the options further down? Try listing the attachments without setting any options apart from selecting the repository page.

comments: author: Paul Weber
body: Thank you.

"...*attachments of the page it is embedded in **by default**..."*That seems to be the problem - i.e. that whatever is uploaded \*must\* be associated to a page from the very beginning, an approach which from my previous experiences is somewhat restricting. To answer your question: yes at the very beginning I had tried to leave everything blank, but it still didn't work.

As an option I've begun to test the "Space Attachments" macro:

* Pro: I've noticed that it does display the list of all uploaded files (good - for a repository)
* Contra: it appears that the option of calling only the files that are associated to a given label doesn't work, i.e. all files associated to the space are always displayed whether they are labeled or not, and irrespective of the specific label filter.

Given the nature of these problems I still believe there must be some kind of permissions issue at the heart of the matter and is not a system bug or malfunction.


Tags: document-management

share