So, I finally found a solution. Okay, in my case, the constellation is a bit different: I have a qml app with a WebView. I ended up to trigger the download from HTML/Javascript side and to process the download on qml side. I failed to use the SingleDownload component because it can not handle data-URLs. So I implemented my own solution:
// ...
WebContext {
id: mainContext
onDownloadRequested: {
var fileUrl = "/home/phablet/.local/share/schulferien.daniel/Downloads/" + download.downloadFileName;
var request = new XMLHttpRequest();
request.open("PUT", fileUrl, false);
request.send(decodeURIComponent(download.url.toString().replace("data:text/plain;,", "")));
PopupUtils.open(downloadedMessage);
}
}
WebView {
id: mainWebView
context: mainContext
// ...
The "fileUrl" has to point to the application path + Downloads, otherwise a "device not open" error will occur.