Is it possible to somehow automate the upload of a file to the Confluence page?
Now the process is as follows: The page moderator enters edit mode, removes the old file from the page and adds a new one, then saves the page.
Is there a tool (possibly a separate development, e.g. SIL Script) to automate this process?
you can use script runner, I'm guessing something like that will work:
def filePath ="file path"
File file = new File(filePath)
if (file.exists()){
InputStream targetStream = new FileInputStream(file);
Attachment att = new Attachment(imgName,"png", file.length(), "UML image");
att.setContent(page)
attachmentManager. saveAttachment(att,null, targetStream)
}
Thanks for the answer, we will try.
Friends, if you have any more ideas, please write. Thank!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.