UNNotification.AddFile
----------------------

Adds an attachment to the notification.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [UNNotification](component_UNNotification.md) | [10.4](newinversion104.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "UNNotification.AddFile"; UNNotificationRef; Path { ; Identifier } ) 

**MBS**( **"UNNotification.AddFile";** /\* Adds an attachment to the notification. \*/  
**$UNNotificationRef**; /\* The reference number of the notification.e.g. $Notification \*/   
**$Path**; /\* The native file path for the file. \*/   
**$Identifier**) /\* Optional; The identifier to distinguis multiple attachments.  
Default is "attachment" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| UNNotificationRef | The reference number of the notification. | $Notification |  |
| Path | The native file path for the file. |  |  |
| Identifier | The identifier to distinguis multiple attachments.   Default is "attachment" |  | Optional |

### Result

Returns OK or error.

### Description

Adds an attachment to the notification.  
Path can be a picture file, an audio file or a movie file.  
As the system takes the file, you may want to make a copy in a temp folder first.  
### Examples

Add a picture file:

 Set Variable \[ $result ; Value: MBS ("UNNotification.AddFile"; $UserNotification ; "/Users/cs/Pictures/Test.jpg"; "image") \]  
### See also

- [UNNotification.Action](UNNotificationAction.md)
- [UNNotification.AddImage](UNNotificationAddImage.md)
- [UNNotification.Badge](UNNotificationBadge.md)
- [UNNotification.Deliver](UNNotificationDeliver.md)
- [UNNotification.Region](UNNotificationRegion.md)
- [UNNotification.Release](UNNotificationRelease.md)
- [UNNotification.Schedule](UNNotificationSchedule.md)
- [UNNotification.SetTitle](UNNotificationSetTitle.md)
- [UNNotification.SubTitle](UNNotificationSubTitle.md)
- [UNNotification.Title](UNNotificationTitle.md)

### Release notes

- **Version 10.4**
    - Added [UNNotification.AddFile](https://www.mbsplugins.eu/UNNotificationAddFile.shtml) and [UNNotification.AddImage](https://www.mbsplugins.eu/UNNotificationAddImage.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 10.4pr4](https://www.mbsplugins.de/archive/2020-08-17/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 11st August 2020 , last changed 20th August 2020

  
[UNNotification.Action](UNNotificationAction.md) - [UNNotification.AddImage](UNNotificationAddImage.md)

[HTML Version](UNNotificationAddFile.shtml)