---
title: "getAttachmentPath"
canonical: "https://support.appfire.com/space/PSJ/15486051/getAttachmentPath"
format: markdown
---
> Macro (aura-html)


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getAttachmentPath(issue key, attachment name) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Get the file path for the attachments with name <attachment name> attached to <issue key>.

Get the file path for the attachments with name <attachment name> attached to <issue key>.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| issue key | String | Yes | Issue key. |
| attachment name | String | Yes | Attachment name. |

## Return Type

**String []**

The file paths. Note that the return type is string [], not string. You will get an array of file paths when you have multiple attachments with the same file name.

## Example

```
string&nbsp;[] filePaths = getAttachmentPath("PROJECT-15", "someFile.txt"); // returns all the file paths for the "someFile.txt" attachments
```

> ⚠️ 1. If there is no issue with that issue key, an exception will be raised.
> ⚠️ 2. The paths returned are ordered by date, starting with most recent attachment added.

## See also

> Macro (contentbylabel)