FileChooserRequest

class FileChooserRequest(pointer: <Error class: unknown class><<Error class: unknown class>>)

A request to open a file chooser.

Whenever the user interacts with an HTML input element with file type, WebKit will need to show a dialog to choose one or more files to be uploaded to the server along with the rest of the form data. For that to happen in a general way, instead of just opening a #GtkFileChooserDialog (which might be not desirable in some cases, which could prefer to use their own file chooser dialog), WebKit will fire the #WebKitWebView::run-file-chooser signal with a #WebKitFileChooserRequest object, which will allow the client application to specify the files to be selected, to inspect the details of the request (e.g. if multiple selection should be allowed) and to cancel the request, in case nothing was selected.

In case the client application does not wish to handle this signal, WebKit will provide a default handler which will asynchronously run a regular #GtkFileChooserDialog for the user to interact with.

Skipped during bindings generation

  • method filter: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

A null-terminated array of strings containing the list of MIME types the file chooser dialog should handle. See webkit_file_chooser_request_get_mime_types() for more details.

Link copied to clipboard

A null-terminated array of strings containing the list of selected files associated to the current request. See webkit_file_chooser_request_get_selected_files() for more details.

Link copied to clipboard

Whether the file chooser should allow selecting multiple files. See webkit_file_chooser_request_get_select_multiple() for more details.

Link copied to clipboard
val webkitFileChooserRequestPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
fun cancel()

Ask WebKit to cancel the request.

Link copied to clipboard
fun getMimeTypesFilter(): <Error class: unknown class>

Get the filter currently associated with the request.

Link copied to clipboard
fun selectFiles(files: List<String>)

Ask WebKit to select local files for upload and complete the request.