Question: how can I reset file input in IE, I used the following and it worked in chrome and FF but not IE 

`fileInputElement.value=""`

what's the alternative in IE ?

Answer: 
If `fileInputElement` is on its own in the form `fileInputForm`, you can do:

```
window.fileInputForm.reset();

```

Otherwise for IE you'll have to replace the element with a clone:

```
fileInputElement.parentNode.replaceChild(
    fileInputElement.cloneNode(true), 
    fileInputElement
);

```
Cross-Browser solution by @Gyrocode.com in vanilla JS:

```
var clearFileInput = function (input) {
  if (!input) {
    return;
  }

  // standard way - works for IE 11+, Chrome, Firefox, webkit Opera
  input.value = null;

  if (input.files && input.files.length && input.parentNode) {
    // workaround for IE 10 and lower, pre-webkit Opera

    var form = document.createElement('form');
    input.parentNode.insertBefore(form, input);

    form.appendChild(input);
    form.reset();

    form.parentNode.insertBefore(input, form);
    input.parentNode.removeChild(form);
  }

}

```