Hi,
I have a question. How can I open a downloaded pdf by the DownloadableResource Component when using WASM. I tried differend things but can’t get access to the pdf. What I’m doing wrong?
import Felgo 3.0
import QtQuick 2.0
App {
id: app
Page {
DownloadableResource {
source: "http://localhost:6931/Source.pdf"
storageName: "DestPDF.pdf"
extractAsPackage: false
Component.onCompleted: {
if(status === DownloadableResource.UnAvailable) {
download()
} else {
openDownloadedFile()
}
}
onStatusChanged: openDownloadedFile()
function openDownloadedFile() {
if(status === DownloadableResource.Available) {
// Can't open it here!!!
//nativeUtils.openUrl(storagePath)
//fileUtils.openFile(storagePath)
console.log(storagePath)
}
}
}
}
}