I have the input file in my form in which I choose the image and its route is shown in my input text, the problem is that it stores the route with * C: \ fakepath * and I all I need is for you to show me the name of the file and its extension. Any suggestions for this?
function actualiza(nombre){
document.getElementById('m1').value='http://localhost:8080/evidencia/'+ nombre;
}
<input type="file" accept="image/*" capture="camera" onChange="actualiza(this.value)">
<input type="text" id="m1" value="ruta" class="form-control">
</div>
</div>