To clear the contents of the file upload control using Javascript, go through
Clear upload file input field [
^].
Otherwise, you can try a method like
function clearFileUpload() {
var up = document.getElementById("fileUploadControl");
up.setAttribute("type", "input");
up.setAttribute("type", "file");
}
}