<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLPreviewReplyAttachment/init(data:contentType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:objc(cs)QLPreviewReplyAttachment(im)initWithData:contentType:"
  },
  "title" : "init(data:contentType:)"
}
-->

# init(data:contentType:)

```
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\abstract Create an attachment for html previews by providing the data and mime type of the attachment.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)