Answers for "fakepath js"

4

fakepath js

var input = document.getElementById("inputFile");
var fReader = new FileReader();
fReader.readAsDataURL(input.files[0]);
fReader.onloadend = function(event){
    var img = document.getElementById("yourImgTag");
    img.src = event.target.result;
}
Posted by: Guest on August-28-2021
0

js C:\fakepath

// Use
document.getElementById("file-id").files[0].name; 

// instead of
document.getElementById('file-id').value
Posted by: Guest on July-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language