---
title: "init(data:contentType:)"
framework: quicklook
role: symbol
role_heading: Initializer
path: "quicklook/qlpreviewreplyattachment/init(data:contenttype:)"
---

# init(data:contentType:)

## Declaration

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

## Parameters

- `data`: The data content of an html preview
- `contentType`: The UTType of the attachment for an html preview

## Discussion

Discussion Create an attachment for html previews by providing the data and mime type of the attachment.
