Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I copy documents to a confluence file list via command line?

Michelle Labonte
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 11, 2022

How do I copy documents to a confluence file list via command line? I would like to write a script that copies documents from a linux directory to a confluence file list page. Is there a directory structure behind the scenes, that a confluence file list page reflects?

3 answers

0 votes
Robby Holtmann_IntraFind Software AG_
Atlassian Partner
August 23, 2022

Hi @Michelle Labonte 

Maybe you do not need to maintain duplicate data storage (Linux/Confluence). 

With our solution iFinder Confluence Search, you can make content from other data sources & applications such as Files Share, Jira, Sharepoint, and many more findable with the Confluence search. With the iFinder Search Macro you can even display a predefined search result list directly on a Confluence page.

 These articles may help you:

 Let me know, if you need further information or like to get a demo first.

Best

Robby

0 votes
Fabio Racobaldo _Herzum_
Community Champion
August 11, 2022

Hi @Michelle Labonte ,

welcome to the Atlassian community!

Confluence attachments are stored in a complex way so you can simply move your attachment in a specific folder in order to have attachments associated to a specific page (here the dts structure managed by Confluence https://confluence.atlassian.com/doc/hierarchical-file-system-attachment-storage-704578486.html).

As suggested by @Florian Bonniec , you need to use REST APIs in order to do that.

Fabio

0 votes
Florian Bonniec
Community Champion
August 11, 2022

Hi @Michelle Labonte 

 

Not sure why you want to do that but Confluence is a content management tool not a document management tool so it should not be use to store files.

 

If you want to do that I would create a confluence page then write a script that use the Confluence REST API to add attachments (files) to this page and list them with a macro.

https://docs.atlassian.com/ConfluenceServer/rest/7.18.3/#content/{id}/child/attachment-createAttachments

You can also create the page with the rest api.

 

Regards

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events