When input file multiple, what if the file name cannot be duplicated?

input file multiple multiple file upload, how to check that the file name can not be duplicated?

Apr.02,2021

event.files is the list of files you uploaded

//
let flag = false;
for(let i = 0;i<event.files.length-1;iPP){
    for(let j = i+ 1;j<event.files.length;jPP){
        if(event.files[i].name==event.files[j].name) flag=true
    }
}
//
const arr = Array.from(event.files).map(item=>item.name)
//set
const set = new Set(arr)
//set
if(set.length!=arr.length){
    ...
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e64c74-5ab25.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e64c74-5ab25.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?