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

Functions#

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 PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest(other)#
Parameters:

otherPySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest

Note

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

property PᅟySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.accessFlags: Combination of QOpenGLBuffer.RangeAccessFlag#

This property Contains the requested file access rights..

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.filePath: PySide6.QtCore.QUrl#

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

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.handleType: HandleType#

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

Access functions:
property PᅟySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.origin: PySide6.QtCore.QUrl#

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

Access functions:
PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.HandleType#

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

Constant

Description

QWebEngineFileSystemAccessRequest.File

QWebEngineFileSystemAccessRequest.Directory

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.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

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.accept()#

Accepts the request to access local files.

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.accessFlags()#
Return type:

Combination of QWebEngineFileSystemAccessRequest.AccessFlag

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.filePath()#
Return type:

PySide6.QtCore.QUrl

Getter of property filePath .

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.handleType()#
Return type:

HandleType

Getter of property handleType .

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.__ne__(rhs)#
Parameters:

rhsPySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest

Return type:

bool

Returns true if lhs and rhs point to different requests.

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.__eq__(rhs)#
Parameters:

rhsPySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest

Return type:

bool

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

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.origin()#
Return type:

PySide6.QtCore.QUrl

Getter of property origin .

PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.reject()#

Rejects a request to access local files.