Input file uploads multiple-choice images, traverses the fles push array, but cannot get the array.

input file multiple-choice image upload will get a files to traverse the files and get each e.target.result. Then push goes into the array, but it takes time to upload asynchronously, and I can get it with setTimeout. But if the Internet speed is not good, you can"t get it. I need to use callback or promise but did not succeed, ask God!

Mar.03,2021

you can write callbacks in onload . If you want to upload all of them, you can add
clipboard.png

to judge the length of arr .
Menu