Vanilla JS to implement Bootstrap based progressbar to indicate file size quota on frontend, supporting both multiple file inputs and single file inputs with 'multiple' atribute.
It scans the entire DOM to detect any combination of file inputs with or without 'multiple' atribute. It sums all filesizes and represents on a progressbar to easily detect if your form exceeds the allowed upload value that you set as a constant.
You can check and use this code to insert progressbar quota functionality on your website without any framework or library dependency because all is Vanilla JS code. One great thing is that you can use it easily on simple from complex scenarios without any code collistion.
The example uses Bootstrap progressbar, but you can adapt it to any other frontend CSS framework in a couple of minutes.
You can check an online demo here.
(Form in demo is not linked to any action, so files are never uploaded)