[Interest] Should onImageSaved give a URL?
jhihn at gmx.com
Wed Jan 22 19:09:20 CET 2020
When assigning an image element to an image capted from a Camera, it is not sufficient to just assign the `path` to the source of the Image element that is to display it:
qrc:/main.qml:100:4: QML Image: Cannot open: qrc:/var/mobile/Containers/Data/Application/8BD0A3CA-74AA-4599-BCF5-E1863AEA688F/Documents/img_0010.jpg
As can be seen, it prepends "qrc:" on to it. The fix is to prefix it with "file://";
var url = "file://"+path;
console.log("onImageCaptured", requestId, path, url);
image.source = url;
But this seems like a bug to me? I am sending this list for discussion. Should onImageSave supply a URL? Should the Image assume the source is a file:// and not a qrc:?
More information about the Interest