I am working through an old project and trying to fix a few bugs.
I have a file upload in HTML
function updateImage() { circleArray = []; newPic = `id="taco" width="300" height="300" src="${$( "#myFile" ).val()}" alt="prime.png"`; $("#hide").empty(); $("#hide").append(`<img ${newPic}>`); makeCanvas(); } <form> <input type="file" id="myFile" name="filename"> <button id='submit'>Submit</button> </form> When I click the submit button I have a function that should update the image displayed with the newly uploaded image.
It seems like the file is uploaded but I am accessing it incorrectly.
I see the following error
GET c:\fakepath\IMG_0544.jpg net::ERR_UNKNOWN_URL_SCHEME
src(url of hosted image) . As you take image fromc:\it seems you are running project on local PC and as it is privacy and security breach(or can possible) if take the completesrcof image from PC so browsers only display a fake path not a real one . One solution can be get the name ofimageuploaded and use a direct path to it like this :C:\User\Images\**Image name**