webkit.file_chooser_request

Module for [FileChooserRequest] class

Types 3

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.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
FileChooserRequest self() nothrowReturns `this`, for use in `with` statements.
FileChooserRequestGidBuilder builder() static nothrowGet builder for [webkit.file_chooser_request.FileChooserRequest] Returns: New builder object
gtk.file_filter.FileFilter filter() @property nothrowGet `filter` property. Returns: The filter currently associated with the request. See [webkit.file_chooser_request.FileChooserRequest.getMimeTypesFilter] for more details.
bool selectMultiple() @property nothrowGet `selectMultiple` property. Returns: Whether the file chooser should allow selecting multiple files. See [webkit.file_chooser_request.FileChooserRequest.getSelectMultiple] for more details.
void cancel() nothrowAsk WebKit to cancel the request.
string[] getMimeTypes() nothrowGet the list of MIME types the file chooser dialog should handle.
gtk.file_filter.FileFilter getMimeTypesFilter() nothrowGet the filter currently associated with the request.
bool getSelectMultiple() nothrowWhether the file chooser should allow selecting multiple files.
string[] getSelectedFiles() nothrowGet the list of selected files associated to the request.
void selectFiles(string[] files) nothrowAsk WebKit to select local files for upload and complete the request.
Constructors
this(void * ptr, Flag!"Take" take)