I think we could benefit from
onSubmitComplete Events which fire before any files are uploaded and then after all file have completed (whether they all succeeded or not). I’ve reached out to a Dev to see if these Events would be possible. FOr now we don’t see a good way for you to disable a button when the uploads start and then enable when the uploads complete.
self.getSibling("Button").props.enabled = False # this executes after the 1st file is uploaded
fileName = event.file.name
fileBytes = event.file.getBytes()
query = "INSERT INTO table (fileName, fileBytes) VALUES (?, ?)"
args = [fileName, fileBytes]
self.getSibling("Button").props.enabled = True
Would sort of work, but I suspect the state of the button would flicker between files as it enables upon completion and then immediately becomes disabled. This did NOT occur when I tested it (the transition was so fast that it couldn’t even be seen, though logging did indicate the button toggled state).