---
title: "chooseFilename(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webopenpanelresultlistener/choosefilename(_:)"
---

# chooseFilename(_:)

Displays a file open panel and returns the selected filename.

## Declaration

```swift
func chooseFilename(_ fileName: String!)
```

## Parameters

- `fileName`: The selected file name.

## See Also

### Related Documentation

- [WebKit Objective-C Programming Guide](apple-archive/documentation/Cocoa/Conceptual/DisplayWebContent.md)

### Setting a File Name

- [chooseFilenames(_:)](webkit/webopenpanelresultlistener/choosefilenames(_:).md)
