Bootstrap 4 File input

Bootstrap 4 File input form component

Bootstrap file input is a field which user can use to upload one or more files (photos, documents or any other file type) from the local storage.


Basic Bootstrap 4 version

Above is an example template for a File input in the Bootstrap 4 version based on jQuery. V4 is an older version of Bootstrap and we discourage implementing it in new projects.

Below you will find the same component but in the latest, more modern Bootstrap 5. We encourage you to use the v5 version instead, the v5 is more lightweight, more reliable and based on pure JavaScript instead of jQuery.

This page only compares the two version, you can find full documentation - with multiple options & API details via one of the links below:
Bootstrap v5 - full documentation Bootstrap v4 - full documentation

Basic Bootstrap 5 version

        
            
      <label class="form-label" for="customFile">Default file input example</label>
      <input type="file" class="form-control" id="customFile" />