---
title: "How to add an attachment link in a page using CLI"
canonical: "https://support.appfire.com/space/SUPPORT/89133308/How%20to%20add%20an%20attachment%20link%20in%20a%20page%20using%20CLI"
format: markdown
---
<span style="color: #000000">This article explains how to insert an attachment link in a page using </span>*<span style="color: #000000">Confluence Command Line Interface</span>*<span style="color: #000000">.</span>

## <span style="color: #000000">Instructions</span>

<span style="color: #000000">Use</span><span style="color: #000000"> the</span> [**modifyPage**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455746/modifyPage) <span style="color: #000000">or</span> [**storePage**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455568/storePage) <span style="color: #000000">actions with the</span> *[markdown](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68458237/--markdown)* <span style="color: #000000">parameter to add an attachment link, or, use the</span> [**addAttachment**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455093/addAttachment)** **<span style="color: #000000">action add an attachment to the Confluence page.</span>

- [**addAttachment**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455093/addAttachment)** **<span style="color: #000000">action: </span>
- [**<span style="color: #091e42">modifyPage </span>**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455746/modifyPage)<span style="color: #000000">action: modifyPage action is used to modify the </span><span style="color: #091e42">current page content by adding content before(--content)</span><span style="color: #091e42"> </span><span style="color: #091e42">or after current content(--content2) </span><span style="color: #091e42">and applying findReplace logic (based on page content XHTML source).</span>
- [**storePage**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455568/storePage) <span style="color: #000000">action: storePage action creates/updates a page. If the page with the mentioned title is not found then it creates a new page with the mentioned information given in the CLI command. If the page exists then it restores the page with the new information/content as per the CLI command given.</span>

> ℹ️ <span style="color: #000000">In the above examples:</span>
> ℹ️ 
> ℹ️ - *<span style="color: #000000">SPACEKEY </span>*<span style="color: #000000">is the space key and </span>*<span style="color: #000000">PAGETITLE </span>*<span style="color: #000000">is the title of the page. </span>
> ℹ️ - ***<span style="color: #000000">./src/itest/confluence/resources/testing.mp3</span>****<span style="color: #000000"> </span>*<span style="color: #000000">is the path of the file to be attached to the page. You must change this file and path to reflect your required attachments.</span>
> ℹ️ - <span style="color: #000000">Replace the URL with the Confluence attachment link (the URL that is displayed when you select the required attachment in Confluence attachments).</span>
> ℹ️ - <span style="color: #000000">Replace </span>*<span style="color: #000000">ABC</span>*<span style="color: #000000"> with the text that you want to display on the Confluence page for the attachment URL.</span>
> ℹ️ - <span style="color: #000000">The output of the </span>[**<span style="color: #091e42">modifyPage</span>**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455746/modifyPage)**<span style="color: #091e42"> </span>**<span style="color: #091e42">and </span>[**<span style="color: #091e42">storePage</span>**](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455568/storePage)<span style="color: #000000"> </span><span style="color: #000000">examples is displayed as:</span>  
> ℹ️ > Macro (inline-media-image)