code: function clearInputFile(f){
      if(f.value){
          try{
              f.value = ''; //for IE11, latest Chrome/Firefox/Opera...
          }catch(err){ }
          if(f.value){ //for IE5 ~ IE10
              var form = document.createElement('form'),
                  parentNode = f.parentNode, ref = f.nextSibling;
              form.appendChild(f);
              form.reset();
              parentNode.insertBefore(f,ref);
          }
      }
  }
docs: http://stackoverflow.com/a/24608023/194065