async function onUserFiles()

in web-app-pix2info-python/src/frontend/scripts.js [293:307]


async function onUserFiles(files) {
    const blobs = []
    for (const file of files) {
        if (!blobs.length || (file.type !== PDF && blobs[0].type !== PDF)) {
            blobs.push(file)
            continue
        }
        console.warn(
            `This demo supports merging images but not PDFs, ignoring ${file.name}`
        )
    }
    if (!blobs.length) return

    await setNewSource(DOCUMENT_SOURCE_FILES, blobs)
}