Struggling with reading the content of a file and storing it into an array for processing. Here's my current approach:
let theFile = document.getElementById("getFile");
let fileVal = theFile.files[0];
let dataFromFile = fileVal.getAsDataURL();
alert(dataFromFile);
However, when trying to assign dataAsUrl to the dataFromFile variable, I encounter the error: Uncaught TypeError: undefined is not a function.
Just a note, this is for a game project where only pure JavaScript is allowed.