0

I have to upload a weight file in a form, what is the best way to put a load image?

I’ve used previously setTimeOut with 600 ms and then of that I show an image with a load icon, I don’t know if this is a good practice but I want to hear more solutions about that

9th Sep 2019, 1:41 AM
Erick Ventura
Erick Ventura - avatar
2 Respuestas
+ 3
it is not a good practice, don't assume that the operation can be finished within 600ms. You should have a server-side script listening to load event of the uploading file, which emits the signal back to frontend to close the loading icon.
10th Sep 2019, 1:09 AM
Gordon
Gordon - avatar
0
thank you :)
12th Sep 2019, 1:03 PM
Erick Ventura
Erick Ventura - avatar