Remote and Local Files   Reference

Remote file



Sample code
function fileSelect() {
fetch(remote.value).then(r => r.blob())
.then(checkFiles)
}
function checkFiles(b) {
let a = [...local.files]
for(let file of a)
{
out.innerText += file.name+","
}
let c = 0
let k = remote.value.split("/");
let remoteFileName = k[k.length-1];
let resultText1 = "\n\n"+ a.length +
' items checked ' + remoteFileName+' is the same as ';
let resultText2 = "\n\n"+a.length +
'items checked and all files are different';
a.map(f=>
{
if((b.type == f.type) && (b.size == f.size))
{
c++;
resultText1+= f.name + ", "
}
})
if(c>0)
{
out.innerText += resultText1;
}
else
{
out.innerText += resultText2;
}
}