I'm trying to validate the upload of a file, and it should always be called new.mpg
, otherwise the program will not work.
function validarNomeArquivo(){
//variavel que recebe o nome do arquivo
var oImg = "bgs/newFile.mpg";
//variavel para comparar o input
var x = document.getElementById('fileBgAtualHD').value;;
if(x==oImg){
alert("yes");
alert(x + " x yes ");
alert(oImg + " oImg yes ");
return true;
}
else{
alert("no");
alert(x + " x no");
alert(oImg + " oImg no ");
return false;
}
}