JSFiddle - React, Tailwind, and code Playground
by mavdhana
HTML
<input type="file" id="inputfile"></input>
JavaScript
$("#inputfile").on('change', function() {
var filename =$('input[type=file]').val().replace(/C:\\fakepath\\/i, '');//file names only(like: Image1.png, Image2.png)
var filepath = '/myimages/files/'+filename;
alert("filepath: "+filepath);//it is giving like: /myimages/files/Image1.png, /myimages/files/Image2.png), But I need to store this file at some location like in my local system (like: "D:/myimages/files/")
});