class QWebEngineFileSystemAccessRequest#

The QWebEngineFileSystemAccessRequest class enables accepting or rejecting requests for local file system access from JavaScript applications. More

Synopsis#

Properties#

  • accessFlagsᅟ - Contains the requested file access rights

  • filePathᅟ - Returns the file path this file system access request is referring to

  • handleTypeᅟ - Returns the type of the requested file system entry. (File or directory)

  • originᅟ - URL of the web page that issued the file system access request

Methods#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

To allow web applications to access local files of the computer, applications must connect to fileSystemAccessRequested , which takes a QWebEngineFileSystemAccessRequest instance as an argument.

If a web applications requests access to local files or directories, fileSystemAccessRequested will be emitted with an QWebEngineFileSystemAccessRequest instance as an argument where accessFlags() indicates the type of the requested access: read, write or both. The signal handler needs to then either call accept() or reject() .

class HandleType#

This enum describes the type of the requested file system entry.

Constant

Description

QWebEngineFileSystemAccessRequest.File

QWebEngineFileSystemAccessRequest.Directory

class AccessFlag#

(inherits enum.Flag) This enum describes the type of the requested access: read, write or both. The options can be OR-ed together from the following list:

Constant

Description

QWebEngineFileSystemAccessRequest.Read

QWebEngineFileSystemAccessRequest.Write

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property accessFlagsᅟ: Combination of QOpenGLBuffer.RangeAccessFlag#

This property Contains the requested file access rights..

Access functions:
property filePathᅟ: QUrl#

This property holds Returns the file path this file system access request is referring to..

Access functions:
property handleTypeᅟ: QWebEngineFileSystemAccessRequest.HandleType#

This property holds Returns the type of the requested file system entry. (File or directory).

Access functions:
property originᅟ: QUrl#

This property holds The URL of the web page that issued the file system access request..

Access functions:
__init__(other)#
Parameters:

otherQWebEngineFileSystemAccessRequest

accept()#

Accepts the request to access local files.

accessFlags()#
Return type:

Combination of AccessFlag

filePath()#
Return type:

QUrl

Getter of property filePathᅟ .

handleType()#
Return type:

HandleType

Getter of property handleTypeᅟ .

__ne__(rhs)#
Parameters:

rhsQWebEngineFileSystemAccessRequest

Return type:

bool

Returns true if lhs and rhs point to different requests.

__eq__(rhs)#
Parameters:

rhsQWebEngineFileSystemAccessRequest

Return type:

bool

Returns true if lhs and rhs both point to the same request.

origin()#
Return type:

QUrl

Getter of property originᅟ .

reject()#

Rejects a request to access local files.