this.files
this.files = Object.values(this.files);
this.files.splice(index, 1);
splice takes array index and remove that array index for More Array.prototype.splice()
clearFile(name, index) {
// this.files is a object
this.files = Object.values(this.files); // Object.values convets object into array
this.files.splice(index, 1);