Hello, I would like to know how to get the path of an image contained in the value of an input of type file. I'm using the following code:
$(document).on("change",'#Upload',function(){ var valor=$(this).attr('value'); var ext= (valor.substring(valor.lastIndexOf("."))).toLowerCase(); if (ext==".jpg" || ext==".jpeg"){ $("#Image").attr("src", valor); }else{alert('Extensao "'+ext+'" nao permitida!');} });
It returns a fakepath, ie a false path. could anyone help me?