<!--
{
  "availability" : [
    "macOS: 10.6.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WebUIDelegate/webView(_:runOpenPanelForFileButtonWith:allowMultipleFiles:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(pl)WebUIDelegate(im)webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:"
  },
  "title" : "webView(_:runOpenPanelForFileButtonWith:allowMultipleFiles:)"
}
-->

# webView(_:runOpenPanelForFileButtonWith:allowMultipleFiles:)

Displays an open panel for a file input control.

```
optional func webView(_ sender: WebView!, runOpenPanelForFileButtonWith resultListener: (any WebOpenPanelResultListener)!, allowMultipleFiles: Bool)
```

## Parameters

`sender`

The web view that sent the message.

`resultListener`

See the [`WebOpenPanelResultListener`](/documentation/WebKit/WebOpenPanelResultListener) protocol for how to set these values.

`allowMultipleFiles`

If <doc://com.apple.documentation/documentation/Swift/true>, the open panel should allow multiple files to be selected; otherwise, it should not.

## Discussion

---

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)