Giter VIP home page Giter VIP logo

antoniobarranco / vanilla-js-input-filesize-progressbar Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 33 KB

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.

License: MIT License

HTML 67.89% JavaScript 32.11%
bootstrap file-upload form-validation input inputfile progressbar vanilla-js

vanilla-js-input-filesize-progressbar's Introduction

Vanilla JS input filesize progressbar

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.

How to use on your website

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.

Demo

You can check an online demo here.

(Form in demo is not linked to any action, so files are never uploaded)

vanilla-js-input-filesize-progressbar's People

Contributors

antoniobarranco avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.