---
title: "init(fileURL:)"
framework: QuickLook UI
role: symbol
role_heading: Initializer
platforms: [macOS 12.0+]
path: "quicklookui/qlpreviewreply/init(fileurl:)"
---

# init(fileURL:)

Creates a preview reply from an existing file URL.

## Declaration

```swift
init(fileURL: URL)
```

## Parameters

- `fileURL`: The file URL with the content of the reply.

## Discussion

Discussion Use init(fileURL:) to create a reply from an existing file URL, such as an image or PDF. The following example illustrates creating a reply from an existing URL: guard let imageFileURL = Bundle.main.url(forResource: "yourImage",                                           withExtension: "jpg") else {     return } let reply = QLPreviewReply(fileURL: imageFileURL)
