diff --git a/retroshare-qml-app/src/components/CustomFileChooser.qml b/retroshare-qml-app/src/components/CustomFileChooser.qml index a9dae21de..4d054351f 100644 --- a/retroshare-qml-app/src/components/CustomFileChooser.qml +++ b/retroshare-qml-app/src/components/CustomFileChooser.qml @@ -1,6 +1,8 @@ import QtQuick 2.7 import QtQuick.Dialogs 1.2 +import "../URI.js" as UriJs + Item { id: compRoot @@ -41,10 +43,18 @@ Item function androidResult (uri) { - console.log("Android image uri found" , uri) - resultFile = uri + console.log("QML Android image uri found" , uri) + resultFile = uriToFilePath (uri) mainWindow.delUriHandler("media", androidResult) } + function normalizeUriToFilePath (uriStr) + { + var uri = new UriJs.URI(uriStr) + var hPath = uri.path() + return "file:///"+hPath + + } + }