I am trying to create an alternative method for receiving and displaying images in a listview (I mean, except for the picker file), since the application already takes too much time to load and process. It turns out that all this time I missed one point ... that img does not accept absolute paths as a source (src).
The code I used is:
var pictureLibrary = Windows.Storage.KnownFolders.picturesLibrary; pictureLibrary.getFilesAsync(query).then(function (items) {....};
Well, the data binding is correct, and listview gets all the file data, including the file path. There is no problem. Although visual studio requests an exception from the file ( base.js ) when using absolute paths for the image tag:
"0x80004004 - JavaScript runtime error: Operation aborted If there is a handler for this exception, the program may be safely continued."
So, will the problem go if the exception is handled? Or is there no way to show the image from pictureLibrary in the img tag in HTML (and so on in listview)?
Is there an alternative way to get an image from pictureLibrary ? And one more thing ... what will be better: use a file collector or load it directly using data files (for example, I'm trying here).
I am a bit naive when it comes to javascript, so please write a descriptive one. Let me know if I lack information.
source share