Forums

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

Is there a way to automatically update the Confluence copy of a file with the new version of the source file on a daily basis?

Melinda Phan May 27, 2016

This question is in reference to Atlassian Documentation: Attaching Files to a Page

Ask your question here...

5 answers

0 votes
Melinda Phan June 1, 2016

Rodney, it has to do with aggregating info from/to different systems/sources.

0 votes
Rodney Hughes
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2016

I'm confused by the use case sad

the Excel file seems to be on a general file server which people can edit.

Then once a day you want to store a back up of that file in Confluence which will hold all previous versions of the file as archived copies - why???  i.e. after one year do you really want Confluence to hold all 365 daily versions of that file?

Why can't your people changing the Excel file on your server, instead of opening the server file, changing it and saving, they just access Confluence, download that file, do their changes and upload it again?  I know it is a little different to just double clicking a file on your PC browser.

Or if it is  a simple table stored as an excel spreadsheet, just create a table on a Confluence page so people just edit the Confluence page

 

0 votes
Peter T
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2016

Everytime you attach a file with the same name you will get a new version. You can attach files using REST API and curl. Here is an example:

curl -v -S -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" -F "comment=this is my file" "http://localhost:8080/confluence/rest/api/content/3604482/child/attachment" | python -mjson.tool

 

The localhost URL needs to change to your wiki URL. The example is from this page:

https://developer.atlassian.com/confdev/confluence-rest-api/confluence-rest-api-examples

Cheers,
Peter T

 

0 votes
Melinda Phan May 27, 2016

It's just an excel file on a network filestore location. 

Do you have any recommendations of websites with example code I can modify?

0 votes
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 27, 2016

What is the source file? Confluence has an extensive API so you could easily do this with any scripting language outside of Confluence.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events