Upload Button Returns Invalid!

Hello guys :raised_hand_with_fingers_splayed:

I have an upload button ( repeated item ) on a client’s website, I’m running a basic validation just to check whether the selected files are valid or not, and the files are always invalid no matter what file type I use ( .jpg/.jpeg/png ), the check is running in the repeater scoop with a forEachItem() function.

let items = [];
await $w('#featuredImgsRep').forEachItem(($item, itemData, index) => {					
    let item = {
        index: index,
        pending: $item('#uploadFeaturedImageBtn').value.length,
        valid: $item('#uploadFeaturedImageBtn').valid
    }
    items.push(item);
})

if (items.length > 0) {
    console.log(items); // <<=== All printed items are invalid
    for (let i = 0; i < items.length; i++) {
        let item = items[0];
        if (item.pending < 1 || item.valid === false) {
            return false;
        }
    }
    return true;
}

I have no idea if it’s something I did or is it a bug :confused:
Any help is appreciated.

Ahmad

Could share your project url

It’s a dashboard page so it cannot be accessed with a URL.

I just removed the stupid built-in validation for now :confused: