Need help with bootstrap-fileinput?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

4.9K Stars 2.3K Forks Other 1.2K Commits 10 Opened issues


An enhanced HTML 5 file input for Bootstrap 4.x./3.x with file preview, multiple selection, and more features.

Services available


Need anything else?

Contributors list

Krajee Logo

Financial Contributors on Open Collective Bower version Latest Stable Version License Packagist Downloads Monthly Downloads

An enhanced HTML 5 file input for Bootstrap 3.x and 4.x with file preview for various files, offers multiple selection, resumable chunk uploads, and more. The plugin allows you a simple way to setup an advanced file picker/upload control built to work specially with Bootstrap 3.x or 4.x CSS3 styles. It enhances the file input functionality further, by offering support to preview a wide variety of files i.e. images, text, html, video, audio, flash, and objects. In addition, it includes AJAX based uploads, dragging & dropping files, viewing upload progress, and selectively previewing, adding, or deleting files.

NOTE: Version 5.x is a significant rewrite. With version 5.x, the plugin code has been revamped with enhanced file management, resumable chunk uploads support, and other new features. You can go through the various closed enhancements and features and documented for Release 5.x milestone.

Krajee Default Theme

NOTE: An alternative new Krajee Explorer Theme (preview shown below) for

has been released and available since v4.3.7. For more theming options and suggestions refer the theming demos.

Krajee Explorer Theme

Documentation and Demo

View the plugin documentation and plugin demos at Krajee JQuery plugins.


  1. Bootstrap 3.x or 4.x
  2. Latest JQuery
  3. Most modern browsers supporting HTML5 (inputs and FileReader API) including CSS3 & JQuery. For Internet Explorer, one must use IE versions 10 and above. IE9 and below will work as a normal file input, and will not support multiple file selection or the HTML 5 FileReader API.
  4. With release 4.0, AJAX uploads are supported. AJAX uploads require that the browser support HTML5 FormData and XHR2 (XMLHttpRequest 2). Most modern browsers support FormData and XHR2. The plugin will automatically degrade to normal form based submission for browsers not supporting AJAX uploads

NOTE: - Bootstrap 4.x is supported in addition to Bootstrap 3.x since release v4.4.4. Refer the CHANGE LOG for details. - You can use the sass branch for installation using

dependency. The master branch can be used for installation using plain


Using Bower

To install using the

package manager run:
bower install bootstrap-fileinput

Using NPM

To install using the

package manager run:
npm install bootstrap-fileinput

Using Composer

To install using the

package manager run:
$ php composer.phar require kartik-v/bootstrap-fileinput "@dev"

or add:

"kartik-v/bootstrap-fileinput": "@dev"

to your composer.json file

Manual Install

You can also manually install the plugin easily to your project. Just download the source ZIP or TAR ball and extract the plugin assets (css and js folders) into your project.


Step 1: Load the following assets in your header.

If you noticed, you need to load the

in addition to the
. The theme file
can be optionally included for the font awesome icons styling. The locale file
can be optionally included for translating for your language if needed.

Optional Dependent Plugins

  • The
    file is the source for the Piexifjs plugin by hMatoba. It is required to be loaded before
    if you wish to use the image resize feature of the bootstrap-fileinput plugin.
  • The
    file is the source for the Sortable plugin by rubaxa. It is required to be loaded before
    if you wish to sort the thumbnails in the initial preview.

For ease of access, the sources for the above plugins are included in the

folder of this project repository.

Step 2: Initialize the plugin on your page. For example,

// initialize with defaults

// with plugin options $("#input-id").fileinput({'showUpload':false, 'previewFileType':'any'});


is the identifier for the input (e.g.
type = file
) on your page, which is hidden automatically by the plugin.

Alternatively, you can directly call the plugin options by setting data attributes to your input field.


Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]



Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]


bootstrap-fileinput is released under the BSD-3-Clause License. See the bundled
for details.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.