---
title: "handleFileInputPrompt(parameters:initiatedBy:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webpage/dialogpresenting/handlefileinputprompt(parameters:initiatedby:)"
---

# handleFileInputPrompt(parameters:initiatedBy:)

Returns the result of handling a JavaScript request to open files.

## Declaration

```swift
@MainActor func handleFileInputPrompt(parameters: WKOpenPanelParameters, initiatedBy frame: WebPage.FrameInfo) async -> WebPage.FileInputPromptResult
```

## Parameters

- `parameters`: The options to use for the file dialog.
- `frame`: Information about the frame whose JavaScript process initiated this call.

## Return Value

Return Value The result of handling the invocation; if the result is affirmative, the response will include a set of files returned to JavaScript.
