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


 


|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | saveAttachment(attachment_id, path_to_file) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Saves the attachment file from an issue to a specific file path.

Saves the attachment file from an issue (based on the attachment id) to a specific file path, on the server. This can prove to be very helpful when you want to save a file stored on S3, for example

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| attachmentId | string | Yes | The id of the attachment. |
| filePath | string | Yes | File path where the attachment file is saved |

## Return Type

**Boolean**

'True' if the attachment file was successfully saved to the specified file path, 'false' otherwise.

## Example

```javascript
saveAttachment("10600", "/mnt/efs/jira10.0.0-sharedhome/silprograms/test.txt");
```

## See also

> Macro (contentbylabel)