Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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;
}
Comment

js C:fakepath

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

// instead of
document.getElementById('file-id').value
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to get only month and year in js 
Javascript :: how to get ip address in javascript 
Javascript :: jquery all elements whose id contains 
Javascript :: react setupproxy 
Javascript :: new fabric canvas set width 
Javascript :: install aos in react 
Javascript :: current date in javascript 
Javascript :: how to add bootstrap to vue js 
Javascript :: js make element invisible 
Javascript :: map function react not appearing 
Javascript :: clear canvas for redrawing 
Javascript :: telli sense for jsx vscode 
Javascript :: npx: Create react chrome extension 
Javascript :: npm proxy config 
Javascript :: jquery populate select from json 
Javascript :: how to square a value in javascript 
Javascript :: bootstrap modal popup disable click outside 
Javascript :: remove commas and dollar sign from string js 
Javascript :: express draft 
Javascript :: Adblock detection in website using javascript 
Javascript :: nodejs increase heap size 
Javascript :: useHistory goback 
Javascript :: javascript letters as number 
Javascript :: how to change react icon color 
Javascript :: how to reset auto numeric js for input 
Javascript :: node express send error response 
Javascript :: javascript call function on click give element id 
Javascript :: fs move file 
Javascript :: how to simulate a keypress in javascript 
Javascript :: javascript add spaces to string 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =