How to load HTML files as attachments using loadFiles CLI action in Confluence Cloud

This article explains how to load HTML files as attachments using loadFiles CLI action in Confluence cloud.

Instructions

By default the loadFiles action converts all text, HTML and markdown files into pages in Confluence. With HTML files, the content is wrapped within an HTML macro. Since HTML macro is not currently available in Confluence Cloud, the loadFiles action results in a blank page.

Alternatively, the loadFiles action with an autoPage option adds the HTML files as attachments to page. This example works because autoPage contains no value and hence does not result in automatic page conversion.

--action loadFiles --file index.html --space TEST --options "autoPage="


autoPage with values (text, HTML and markdown) provides customised behaviour for the loadFiles action. If a value is provided with autoPage, only the types specifically listed are automatically converted to pages similar to the default behaviour.