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 rightsfilePath
- Returns the file path this file system access request is referring tohandleType
- 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#
def
accept
()def
accessFlags
()def
filePath
()def
handleType
()def
__ne__
(rhs)def
__eq__
(rhs)def
origin
()def
reject
()
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 QWebEnginePage::fileSystemAccessRequested, which takes a QWebEngineFileSystemAccessRequest
instance as an argument.
If a web applications requests access to local files or directories, QWebEnginePage::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:
other –
PySide6.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: RangeAccessFlags#
This property Contains the requested file access rights..
- Access functions:
accessFlags
()
- 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:
filePath
()
- property PᅟySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.handleType: HandleType#
This property holds Returns the type of the requested file system entry. (File or directory).
- Access functions:
handleType
()
- 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:
origin
()
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.HandleType#
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.AccessFlag#
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.accept()#
Accepts the request to access local files.
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.accessFlags()#
- Return type:
AccessFlags
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.filePath()#
- Return type:
Getter of property filePath
.
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.handleType()#
- Return type:
Getter of property handleType
.
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.__ne__(rhs)#
- Parameters:
rhs –
PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest
- Return type:
bool
Returns true
if lhs
and rhs
point to different requests.
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.__eq__(rhs)#
- Parameters:
rhs –
PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest
- Return type:
bool
Returns true
if lhs
and rhs
both point to the same request.
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.origin()#
- Return type:
Getter of property origin
.
- PySide6.QtWebEngineCore.QWebEngineFileSystemAccessRequest.reject()#
Rejects a request to access local files.