bootstrap-fileinput upgrades file inputs for Bootstrap 3–5 with previews, multi-select, AJAX uploads, and drag-and-drop.
Overview
bootstrap-fileinput is a jQuery plugin that turns a standard HTML file input into a Bootstrap-styled file picker and upload control. It targets Bootstrap 5.x, 4.x, and 3.x CSS and can detect the loaded Bootstrap version when the Bootstrap JavaScript is present. The widget adds caption, action button, and preview regions so users can browse, remove, upload, and inspect selections in one control.
Preview support covers images, text, HTML, video, audio, Flash, and generic objects, with configurable allowed preview types and MIME filters. Users can select multiple files, paste from the clipboard, drag and drop onto the control, and watch loading progress. AJAX uploads use HTML5 FormData and XHR2 where available, including resumable chunked uploads in recent major releases, and fall back to normal form submission on older browsers. Initial preview modes help edit scenarios when existing files must be shown alongside new picks.
The plugin exposes extensive layout templates, locales, themes including an explorer-style preview theme, and events for integration with custom server endpoints. Installation is available through npm, Bower, Composer, or manual asset copy; pages load jQuery, Bootstrap, and the plugin CSS and JS in order.
It fits admin panels and web forms that already use Bootstrap and need richer file selection UX than a bare input, without building a custom uploader from scratch.
Key features
- Bootstrap 3/4/5 styling
- Multi-file selection
- Rich file previews
- AJAX and chunked uploads
- Drag-and-drop and paste
- Resumable upload support
- Initial preview for updates
- Localized and themable UI
Use cases
- Bootstrap admin file uploads
- Image and media pickers
- Multi-attachment forms
- AJAX upload with progress
- Record edit with existing files