Getting the file name is fairly easy. As matsko points out, you cannot get the full file path on the user’s computer for security reasons.
var file = $('#image_file')[0].files[0]
if (file){
console.log(file.name);
}
Getting the file name is fairly easy. As matsko points out, you cannot get the full file path on the user’s computer for security reasons.
var file = $('#image_file')[0].files[0]
if (file){
console.log(file.name);
}