---
title: "init(data:contentType:)"
framework: QuickLook UI
role: symbol
role_heading: Initializer
platforms: [macOS 12.0+]
path: "quicklookui/qlpreviewreplyattachment/init(data:contenttype:)"
---

# init(data:contentType:)

Creates a preview reply attachment with the specified type.

## Declaration

```swift
init(data: Data, contentType: UTType)
```

## Parameters

- `data`: The content of the attachment.
- `contentType`: The type of the attachment.
