Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.12.3
Description
Current QDarwinWebViewPrivate::setUrl() implementation is as following.
https://code.qt.io/cgit/qt/qtwebview.git/tree/src/plugins/darwin/qdarwinwebview.mm#n311
void QDarwinWebViewPrivate::setUrl(const QUrl &url) { if (url.isValid()) { if (url.isLocalFile()) { // We need to pass local files via loadFileURL and the read access should cover // the directory that the file is in, to facilitate loading referenced images etc [wkWebView loadFileURL:url.toNSURL() allowingReadAccessToURL:QUrl(url.toString(QUrl::RemoveFilename)).toNSURL()]; } else { [wkWebView loadRequest:[NSURLRequest requestWithURL:url.toNSURL()]];
If there is file structure like:
- /Library/Application Support/base/html/index.html
- /Library/Application Support/base/pdf/sample.pdf
sample.pdf can't be access from index.html on WebView.
Expectation: Allowing additional read directory can be set with add parameter for setUrl.