---
title: "getAttachment"
canonical: "https://support.appfire.com/space/CSOAP/68458539/getAttachment"
format: markdown
---
> Macro (aura-html)

See also: [Actions](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68458401)

> Macro (details)
> 
> | **Description** | Get a attachment data and put to a file. The page the attachment is on must be provided by space and title or page id. If the attachment name is not provided, it is derived from the file. A numeric attachment id can substitute for the attachment name. |
> | --- | --- |
> | **Required Parameters** | (([space](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68459481) and [title](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68457665)) or [id](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68454565)), [file](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455055) |
> | **Optional Parameters** | [name](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68459513), [version](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68454985), [encoding](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68458746) |
> | **Type** | [Get](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455033/Action+Types#ActionTypes-Get) |
> | **Category** | [Attachments](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68455044/Action+Categories#ActionCategories-Attachments) |
> | **Output Formats** |  |
> | **Replacement Variables** | space, spaceName, title, contentId, contentUrl, pageId, blogId, attachment, attachmentId, attachmentUrl, attachmentVersion |
> | **Hosting** | cloud,server,datacenter |
> | **Since Version** |  |
> | **Examples** | [getAttachment](https://appfire.atlassian.net/wiki/spaces/CSOAP/pages/68458176/Examples#Examples-getAttachment) |

## Related How To's

> Macro (cql-query)