mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 09:57:19 -05:00
Create a funtion to generate filepath from received uri
This commit is contained in:
parent
9a621b7509
commit
e58cd8f363
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user