In my HTML, I have this input:
<input type="file" id="csv_file_input" />
I want to read the text content from that input. I tried this:
var fileInput = $('#csv_file_input');
var file = fileInput[0].files[0];
Windows.Storage.FileIO.readTextAsync(file)
.then(function(text) {
console.log(text);
});
But I got JavaScript runtime error: Type mismatch
Wondering how I can fix this
Please use
FileOpenPickerto getStorageFilein uwp avoid above issue.