---
title: "attachFileFromURL"
canonical: "https://support.appfire.com/space/PSCONF/15307007/attachFileFromURL"
format: markdown
---
> Macro (aura-html)

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | attachFileFromURL(fileUrl, pageId) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Adds an attachment located on an URL path to a selected page.

Adds an attachment located on an URL path to a selected page.

## Return Type

**Boolean (true/false)**

The return value represents the success of the attachment process. If the routine returns true the file was attached successfully.

## Example

```javascript
string url_to_file;
number page;
url_to_file = "http://otherServer/generateForm.aspx?PackageName=customField_10192";
page = 11801;
attachFileFromURL(url_to_file, page);
```

Result: Returns true if the file is at the selected location and the issue exists, meaning the file was attached. Returns false if any of the conditions stated before are not met.

## See also

> Macro (contentbylabel)