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

Overview

Krajee Logo
bootstrap-fileinput
Donate       kartikv

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

An enhanced HTML 5 file input for Bootstrap 5.x, 4.x, and 3.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 5.x, 4.x, and 3.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.

NEW: Bootstrap 5.x support is added from v5.2.0 (major release after v5.1.5) of the plugin. With v5.2.0, the plugin is able to automatically detect the bootstrap library version and deliver the relevant bootstrap specific functionality (if the bootstrap library JS file is loaded). Alternatively, check the $.fn.fileinputBsVersion setting for advanced use cases to avoid Bootstrap version detection issues.

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 bootstrap-fileinput 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.

Pre-requisites

  1. Bootstrap 5.x or 4.x, or 3.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 5.x is supported in addition to Bootstrap 3.x and 4.x since release v5.2.0. Refer the CHANGE LOG for details.
  • 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 bootstrap-sass dependency. The master branch can be used for installation using plain bootstrap dependency.

Installation

Using Bower

To install using the bower package manager run:

bower install bootstrap-fileinput

Using NPM

To install using the npm package manager run:

npm install bootstrap-fileinput

Using Composer

To install using the composer 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.

Usage

Step 1: Load the following assets on your page in the order mentioned.

<!-- bootstrap 5.x or 4.x is supported. You can also use the bootstrap css 3.3.x versions -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" crossorigin="anonymous">

<!-- default icons used in the plugin are from Bootstrap 5.x icon library (which can be enabled by loading CSS below) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" crossorigin="anonymous">

<!-- alternatively you can use the font awesome icon library if using with `fas` theme (or Bootstrap 4.x) by uncommenting below. -->
<!-- link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css" crossorigin="anonymous" -->

<!-- the fileinput plugin styling CSS file -->
<link href="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/css/fileinput.min.css" media="all" rel="stylesheet" type="text/css" />

<!-- if using RTL (Right-To-Left) orientation, load the RTL CSS file after fileinput.css by uncommenting below -->
<!-- link href="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/css/fileinput-rtl.min.css" media="all" rel="stylesheet" type="text/css" /-->

<!-- the jQuery Library -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" crossorigin="anonymous"></script>

<!-- buffer.min.js and filetype.min.js are necessary in the order listed for advanced mime type parsing and more correct
     preview. This is a feature available since v5.5.0 and is needed if you want to ensure file mime type is parsed 
     correctly even if the local file's extension is named incorrectly. This will ensure more correct preview of the
     selected file (note: this will involve a small processing overhead in scanning of file contents locally). If you 
     do not load these scripts then the mime type parsing will largely be derived using the extension in the filename
     and some basic file content parsing signatures. -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/plugins/buffer.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/plugins/filetype.min.js" type="text/javascript"></script>

<!-- piexif.min.js is needed for auto orienting image files OR when restoring exif data in resized images and when you
    wish to resize images before upload. This must be loaded before fileinput.min.js -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/plugins/piexif.min.js" type="text/javascript"></script>

<!-- sortable.min.js is only needed if you wish to sort / rearrange files in initial preview. 
    This must be loaded before fileinput.min.js -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/plugins/sortable.min.js" type="text/javascript"></script>

<!-- bootstrap.bundle.min.js below is needed if you wish to zoom and preview file content in a detail modal
    dialog. bootstrap 5.x or 4.x is supported. You can also use the bootstrap js 3.3.x versions. -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>

<!-- the main fileinput plugin script JS file -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/fileinput.min.js"></script>

<!-- following theme script is needed to use the Font Awesome 5.x theme (`fas`). Uncomment if needed. -->
<!-- script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/themes/fas/theme.min.js"></script -->

<!-- optionally if you need translation for your language then include the locale file as mentioned below (replace LANG.js with your language locale) -->
<script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/locales/LANG.js"></script>

With v5.2.1, the plugin is able to automatically detect the bootstrap library version and deliver the relevant bootstrap specific functionality (if you have loaded the bootstrap.min.js before fileinput.min.js). In case of any issues - you can explicitly set the bootstrap version by setting the following variable before the plugin initialization script.

// set this before initializing the fileinput plugin
$.fn.fileinputBsVersion = '3.4.1'; // for example if using bootstrap css 3.4.1 version

If you noticed, you need to load the jquery.min.js and bootstrap.min.css in addition to the fileinput.min.css and fileinput.min.js. The theme file themes/fa/theme.js can be optionally included for the font awesome icons styling. The locale file <lang>.js can be optionally included for translating for your language if needed.

Optional Dependent Plugins

  • The piexif.min.js file is the source for the Piexifjs plugin by hMatoba. It is required to be loaded before fileinput.min.js if you wish to use the image resize feature of the bootstrap-fileinput plugin.
  • The sortable.min.js file is the source for the Sortable plugin by rubaxa. It is required to be loaded before fileinput.min.js 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 js/plugins folder of this project repository.

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

// HTML markup
<input id="input-id" name="file-data" type="file">

<script>
$(document).ready(function() {
    // initialize with defaults
    $("#input-id").fileinput();

    // with plugin options
    $("#input-id").fileinput({'uploadUrl': '/path/to/your-upload-api', 'previewFileType': 'any'});
});
</script>

The #input-id 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. To auto initialize the plugin with just HTML markup - add the CSS class file to your file input markup element.

<input id="input-id" type="file" class="file" data-preview-file-type="text" >

NOTE: When initializing the plugin via javascript (as mentioned earlier), do not add the CSS class file to the input markup (else you would get an erronaeous / inconsistent output).

Contributors

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]

Individuals

Organizations

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

License

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

Comments
  • Enhance and fix resumable and ajax queues

    Enhance and fix resumable and ajax queues

    Scope

    This pull request includes a

    • [x] Bug fix
    • [ ] New feature
    • [ ] Translation

    Changes

    The following changes were made

    • changed fileManager.processed to fileManager.filesProcessed this makes more sense, for code readability this is an optional change

    • changed Object.keys to $h.getObjectKeys method this is an optional change https://stackoverflow.com/questions/5223/length-of-a-javascript-object

    • added getObjectKeys method in $h

    • added getObjectSize method in $h

    • added taskManager in $h

    • added $.whenAll jquery extension to handle running all chunks a once if resumableUploadOptions.maxThreads is equal to 0 I think this could be removed, since we could want chunks to always be uploaded "maxThreads" at a time. If so some code in taskManager.TasksPool.runAllTasksParallels could be remove the "// if run all at once" part with the jquery extension

    • ajax requests are stand alone tasks (promises)

    • resumable uploads are a pool of tasks foreach chunks they are runned in parrallel

    I wont remove the last setInterval for upload: function this is too much work, and code readability is poor in my opinion. It would benefit to be reactored using an object approach instead of a functionnal programming.

    There should also be a unique upload method: resumable. It would be adapted for each options

    Related Issues

    #1557

    enhancement 
    opened by Kwaadpepper 36
  • bootstrap-fileinput:

    bootstrap-fileinput: "fileupload": Error loading the piexif.js library.

    first of all: GREAT JOB!!!

    Steps to reproduce the issue

    this is my plugin initialization:

     $("#fileupload").fileinput({
          language : 'es',
          showUpload:true, 
          uploadUrl: 'someurl',
          allowedFileType : ['image'],
          allowedFileExtensions : ['jpg','jpeg','png'],
          previewFileType :'image',
          showCaption: true,
          dropZoneEnabled: true,
          showRemove: true,
          maxFileCount: 6,
          maxFileSize: 100000,
          browseClass: "btn btn-success",
          browseLabel: "Elegir Imagen/es",
          browseIcon: "<i class=\"fa fa-file-image-o\"></i> ",
          removeClass: 'btn btn-danger',
          removeTitle: 'Borrar Imagen',      
          removeLabel: "orrar",
          removeIcon: "<i class=\"fa fa-trash-o\"></i> ",
          uploadClass: "btn btn-info",
          uploadLabel: "Subir",
          uploadIcon: "<i class=\"fa fa-upload\"></i> "
        });
    

    this is the html part,

    <input id="fileupload" type="file" name="file" multiple>

    I know that I've should named it as file[], but the server which receives the files expect name to be file. And it doesn't produce any error.

    Expected behavior and actual behavior

    The plugin seems to work correctly, but in the chrome console I've get the piexif.js error every time I upload a file. I'm just reporting it.

    Environment

    Browsers

    • [X] Google Chrome
    • [ ] Mozilla Firefox
    • [ ] Internet Explorer
    • [ ] Safari

    Operating System

    • [ ] Windows
    • [ ] Mac OS X
    • [X] Linux
    • [ ] Mobile

    Libraries

    • jQuery version: 3.3.1
    • bootstrap-fileinput version: 4.5.0

    Isolating the problem

    • [ ] This bug happens on the plugin demos page
    • [ ] The bug happens consistently across all tested browsers
    • [X] This bug happens when using bootstrap-fileinput without other plugins
    • [ ] I can reproduce this bug in a jsbin
    enhancement 
    opened by AJavierSanchez 26
  • Custom preview for large files

    Custom preview for large files

    I am trying to upload large file but it take a while.

    My options:

    showPreview : true
    previewFileIcon : "<i class='fa fa-file'></i>"
    preferIconPreview: true
    

    My question is why your library need to process file when enabling preview when I am setting preview file icon to custom icon, how can I preview custom icon for any type of file even if it is a large file.

    opened by leader-pro 23
  • AutoOrientImage not working with IOS on iPhone

    AutoOrientImage not working with IOS on iPhone

    There is a issue with image orientation in preview. When I take a vertical photo from my iPhone and I upload it the picture is not oriented correctly capture

    In _previewFile function I see every time that the class "rorate-1" is added. It seem to have a issue to read EXIF informations of picture.

    I use this workaround to solve this : Import pexifjs script

    and in fileinput.js I modified the _previewFile function like this :

    ....
    if ($img.length && self.autoOrientImage) {
    	$h.validateOrientation(file, function (value) {
    		if (!value) {
    			self._validateImage(previewId, caption, ftype, fsize, iData);
    			return;
    		}
    		
    		var exifObj = piexif.load($img[0].href);
    		value = exifObj["0th"][piexif.ImageIFD.Orientation];
    
    		var $zoomImg = $preview.find('#zoom-' + previewId + ' img'), css = 'rotate-' + value;
    		if (value > 4) {
    			css += ($img.width() > $img.height() ? ' is-portrait-gt4' : ' is-landscape-gt4');
    		}
    		$h.addCss($img, css);
    		$h.addCss($zoomImg, css);
    		self._raise('fileimageoriented', {'$img': $img, 'file': file});
    		self._validateImage(previewId, caption, ftype, fsize, iData);
    		$h.adjustOrientedImage($img);
    	});
    }
    ....
    

    jquery v 3.2.1 fileinput v 4.4.9 bootstrap v 4.1.1

    enhancement 
    opened by liotims 19
  • If I dont upload anything, I cant delete initialPreview items

    If I dont upload anything, I cant delete initialPreview items

    I have a problem. When I try to delete image from the edit list delete button does not work, but if I upload anything than works. I have configured fileinput like this:

    fileInput.fileinput({
                uploadUrl: "{{ route('admin.products.upload-temp-image') }}",
                uploadAsync: true,
                maxFileCount: 10,
                allowedFileExtensions: ['jpg', 'png', 'gif'],
                showBrowse: false,
                showUpload: false,
                browseOnZoneClick: true,
                initialPreviewAsData: true,
                initialPreviewFileType: 'image',
                uploadExtraData: {
                    '_token': '{{csrf_token()}}',
                },
                deleteExtraData: {
                    '_token': '{{csrf_token()}}',
                },
                initialPreview: [
                            '/uploads/products/{{ $obj->part_number }}/images/{{ $img->src }}',
                ],
                initialPreviewConfig: [
                                caption: "{{ $img->src }}",
                                size: '{{ \File::size(public_path().'/uploads/products/'.$obj->part_number.'/images/'.$img->src) }}',
                                width: "120px",
                                url: "/site/file-delete",
                                key: '{{ $img->id }}'
                            },
                ]
            })`
    

    Please Help.

    opened by buglinjo 19
  • Only clear when the native file input is cleared

    Only clear when the native file input is cleared

    While we are at it, I've added an option to delay the clearing of the view until either a new file is selected or the file dialog cancel (and having a previous file selected so the file input clears) and resetting to initial empty or preview view. So by setting 'clearOnBrowse' to false the UI will not change until the dialog is closed. Let me know if you see any problems with this approach.

    enhancement 
    opened by jespermjonsson 18
  • .fileinput('upload') Method does not work in 5.0.9

    .fileinput('upload') Method does not work in 5.0.9

    Prerequisites

    • [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
    • [x] The issue still exists against the latest master branch of bootstrap-fileinput.
    • [x] This is not an usage question. I confirm having read the plugin documentation and demos.
    • [x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
    • [x] I have attempted to find the simplest possible steps to reproduce the issue.
    • [ ] I have included a failing test as a pull request (Optional).

    Steps to reproduce the issue

    1. call upload method within other JS function .fileinput('upload')
    2. it does not trigger async upload
    3. upload URL is set properly
    4. the same code worked just fine with 5.0.1
    5. if I set showUpload: true, and click on it after I select the file, the upload starts

    Expected behavior and actual behavior

    When I follow those steps, I see...

    I was expecting...

    Environment

    Browsers

    • [x] Google Chrome
    • [ ] Mozilla Firefox
    • [ ] Internet Explorer
    • [ ] Safari

    Operating System

    • [x] Windows
    • [ ] Mac OS X
    • [ ] Linux
    • [ ] Mobile

    Libraries

    • jQuery version:
    • bootstrap-fileinput version: 5.0.9

    Isolating the problem

    • [ ] This bug happens on the plugin demos page
    • [ ] The bug happens consistently across all tested browsers
    • [ ] This bug happens when using bootstrap-fileinput without other plugins
    • [ ] I can reproduce this bug in a jsbin
    opened by AngelJakimovski 16
  • Setting allowedFileExtensions will show error message but still will add file preview and wont prevent its upload

    Setting allowedFileExtensions will show error message but still will add file preview and wont prevent its upload

    I wanted to use the plugin as single video file upload, limited to certain extensions with switchable languages.

    Steps to reproduce the issue - this is my setup

            $("#video-upload-input").fileinput({
                theme: 'fa',
                uploadUrl: uploadEndpointUrl,
                enableResumableUpload: true,
                uploadAsync: false,
                initialPreviewFileType: 'video',
                allowedFileExtensions: allowedExtensions,
                showCancel: true,
                maxFileSize: 10000000,
                resumableUploadOptions: {
                    uploadParamNames: {
                        chunkCount: 'chunkCount',
                        chunkIndex: 'ChunkNumber',
                        chunkSize: 'chunkSize',
                        chunkSizeStart: 'chunkSizeStart',
                        chunksUploaded: 'chunksUploaded',
                        fileBlob: 'File',
                        fileId: 'fileId',
                        fileName: 'fileName',
                        fileRelativePath: 'fileRelativePath',
                        fileSize: 'fileSize',
                        retryCount: 'retryCount'
                    }
                },
                uploadExtraData: function (previewId, index) {
    
                    var data = { "UploadID": "some guid" };
                    return data;
    
                }
            }).on('filepreajax', function (event, previewId, index) {
    
                console.log(event);
                alert('File pre ajax triggered');
    
            }).on('fileuploaded', function (event, previewId, index, fileId) {
    
                console.log(event);
                alert('File Uploaded', 'ID: ' + fileId);
    
            }).on('fileuploaderror', function (event, data, msg) {
    
                console.log(event);
                alert('File Upload Error', 'ID: ' + data.fileId + ', Thumb ID: ' + data.previewId);
                return false;
            });
    

    Expected behavior vs. actual behavior

    When I follow those steps, i can get error message that I selected file with wrong extension, however file gets added to preview anyways and upload button shows too which I believe it should NOT be like that. Why file gets added to stack? In fileuploaderror there is no event code or event type property which would tell me that it was validation error that happened not something else so I can at least reset the plugin (in case of multi lang site). There is also no filevalidationerror event. And finaly I can still trigger the upload regardless initially failed validation. Is there something I am missing? I expected that file will not be added to upload stack in first case and there wont be any chance of uploading such file.

    Browsers

    • Google Chrome
    question 
    opened by JadaVonRuth 15
  • Ajax resumable upload endless loop, (and multple chunks file upload issue ?)

    Ajax resumable upload endless loop, (and multple chunks file upload issue ?)

    Prerequisites

    • [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
    • [x] The issue still exists against the latest master branch of bootstrap-fileinput.
    • [x] This is not an usage question. I confirm having read the plugin documentation and demos.
    • [x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
    • [x] I have attempted to find the simplest possible steps to reproduce the issue.
    • [ ] I have included a failing test as a pull request (Optional).

    Steps to reproduce the issue

    ~I have not found a sure way to reproduce this yet, but here is my config~ This can happen on demo page just upload a large file to force chunk upload, so larger than 2MB

    $('#uploadInput').fileinput({
        language: uploadLocale,
        uploadAsync: true,
        enableResumableUpload: true,
    
        uploadUrl: actions.upload.url,
        uploadExtraData : {
            _token: 'tokenString',
            filePath: "${decodeURIComponent(getUrlLocationParameter('path'))}/"
        },
            
        showCaption: false, 
        showBrowse: false, 
        showPreview: true,
        showRemove: false, 
        showUpload: true, 
        showUploadStats: true,
        showCancel: null,
        showPause: null,
        showClose: false,
        showUploadedThumbs: true,
        showConsoleLogs: true,
    
        browseOnZoneClick: false,
        autoReplace: false,
        autoOrientImage: false, 
        autoOrientImageInitial: true,
        focusCaptionOnBrowse: true,
        focusCaptionOnClear: true,
        required: false,
    
        rtl: false,
        hideThumbnailContent: false,
        encodeUrl: true,
        generateFileId: null,
        previewClass: '',
        captionClass: '',
        frameClass: 'krajee-default',
        mainClass: 'file-caption-main',
    
        theme: "krajee-explorer",
    
        overwriteInitial: false,
        initialPreviewAsData: true,
        maxFileSize: 10000,
        removeFromPreviewOnError: true,
        previewFileType: 'any',
    
        fileSizeGetter: function(bytes) {
            i = Math.floor(Math.log(bytes) / Math.log(1024))
            sizes = [trans('B'), trans('KB'), trans('MB'), trans('GB'), trans('TB'), trans('PB'), trans('EB'), trans('ZB'), trans('YB')]
            return (bytes / Math.pow(1024, i)).toFixed(2) * 1 + ' ' + sizes[i]
        }
    });
    

    The server answer

    Capture d’écran de 2020-05-12 13-29-40

    1. Setup a resumable upoad

    2. open the JS debugger

    3. set a breakpoint on the if statement of the processQueu method

       processQueue = function () {
           var config, xhr;
           if (self.ajaxCurrentThreads < self.maxAjaxThreads) {
               config = self.ajaxQueue.shift();
               if (typeof config !== 'undefined') {
                   self.ajaxCurrentThreads++;
                   xhr = $.ajax(config).done(function () {
                       clearInterval(self.ajaxQueueIntervalId);
                       self.ajaxCurrentThreads--;
                   });
                   self.ajaxRequests.push(xhr);
               }
           }
       };
      

    Expected behavior and actual behavior

    This is the context, when i set the breakpoint: file has been uploaded, see the capture

    Capture d’écran de 2020-05-12 13-38-15

    As you can see, server answered "{"chunkIndex":"4","append":true}"

    I believe this is wanted as stated in the example https://plugins.krajee.com/file-input#ajax-resumable

    I was expecting...

    AllTimeouts to be ended.

    Also if i anwer HTTP 500 and error message from the server see the following capture, it seems to be stuck. The loop still happens.

    Capture d’écran de 2020-05-12 13-42-58

    Environment

    Browsers

    • [x] Chromium Version 81.0.4044.138 (Build officiel) snap (64 bits)
    • [ ] Google Chrome
    • [x] Mozilla Firefox 76.0 (64 bits)
    • [ ] Internet Explorer
    • [ ] Safari

    Operating System

    • [ ] Windows
    • [ ] Mac OS X
    • [x] Linux
    • [ ] Mobile

    Libraries

    • jQuery version: 3.5.1
    • bootstrap-fileinput version: 5.0.9

    Isolating the problem

    • [x] This bug happens on the plugin demos page
    • [x] The bug happens consistently across all tested browsers
    • [ ] This bug happens when using bootstrap-fileinput without other plugins
    • [ ] I can reproduce this bug in a jsbin
    enhancement 
    opened by Kwaadpepper 14
  • Revamp SCSS with better variables and extensions

    Revamp SCSS with better variables and extensions

    Prerequisites

    • [X] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
    • [X] The issue still exists against the latest master branch of bootstrap-fileinput.
    • [X] This is not an usage question. I confirm having read the plugin documentation and demos.
    • [X] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
    • [X] I have attempted to find the simplest possible steps to reproduce the issue.
    • [ ] I have included a failing test as a pull request (Optional).

    Steps to reproduce the issue

    1. Set-up webpack with sass-loader
    2. Import the sass file from any stylesheet :
    // vendor.scss
    $bootstrap-fileinput-img-path: '~bootstrap-fileinput/img';
    @import '~bootstrap-fileinput/sass/fileinput';
    

    Expected behavior and actual behavior

    When I follow those steps, webpack cannot compile the sass file, as one of the loading.gif reference is hardcoded, and does not use the $bootstrap-fileinput-img-path variable.

    Module not found: Error: Can't resolve '../img/loading.gif'

    I was expecting webpack to compile it properly with such as variable.

    Could you please replace url('../img/loading.gif') by url('#{$bootstrap-fileinput-img-path}/loading.gif') here ?

    https://github.com/kartik-v/bootstrap-fileinput/blob/v4.4.4/sass/fileinput.scss#L64

    Environment

    Browsers

    • [X] Google Chrome
    • [X] Mozilla Firefox
    • [X] Internet Explorer
    • [X] Safari

    Operating System

    • [X] Windows
    • [X] Mac OS X
    • [X] Linux
    • [X] Mobile

    Libraries

    • jQuery version: N/A
    • bootstrap version : 4.0
    • bootstrap-fileinput version: 4.4.4

    Isolating the problem

    (Style only, not a JavaScript problem)

    • [ ] This bug happens on the plugin demos page
    • [X] The bug happens consistently across all tested browsers
    • [X] This bug happens when using bootstrap-fileinput without other plugins
    • [ ] I can reproduce this bug in a jsbin
    enhancement 
    opened by flo-sch 14
  • Wrong order in initialPreviewConfig

    Wrong order in initialPreviewConfig

    Finally I figured out the problem with sorting. I setted uploadAsync: true. When you upload images for eg. 1.png, 2.png, 3.png, then upload is running in alphabetical order, but initialPreviewConfig not always will be ["1.png", "2.png", "2.png"], because it depends on responses end time: In this case I got ["1.png", "3.png", "2.png"], but in preview I saw images in alphabetical order. So after switching first image (1.png in preview) with second (2.png in preview), the initialPreviewConfig is ["3.png", "1.png", "2.png"], but should be ["2.png", "3.png", "1.png"].

    Tomorrow I will provide video which simply show this issue.

    bug 
    opened by koxu1996 14
  • showRemove=>false from fileActionSettings and setting of width from initialPreviewConfig not working

    showRemove=>false from fileActionSettings and setting of width from initialPreviewConfig not working

    Hi Kartik, thank you for all your widgets and plugins. I just want some help with this, anything wrong why my 'showRemove'=>false and 'width'=>'120px' not working?

    [ 'attribute'=>'photo', 'value'=>'../photos/'.$model->photo, 'format' => ['image',['width'=>'100','height'=>'100']], 'type' => DetailView::INPUT_WIDGET, 'widgetOptions' => [ 'class' => \kartik\file\FileInput::class, 'options' => [ 'accept' => 'image/*', 'multiple'=>false, ], 'pluginOptions' => [ 'initialPreview'=>[ !empty($model->photo) ? Yii::$app->params['backendUrl']. '/photos/' .$model->photo : null, ], 'initialCaption'=>!empty($model->photo) ? $model->photo : false, 'initialPreviewConfig' => [ [ 'caption' => $model->photo, 'width' => '120px', ], ], 'allowedFileTypes' => ['image'], // allow only images 'initialPreviewAsData'=>true, 'showUpload' => false, 'showRemove' => true, 'showCancel' => false, 'browseLabel' => '', 'removeLabel' => '', 'mainClass' => 'input-group-sm', 'bytesToKB' => 1024, 'sizeUnits' => ['B', 'KB', 'MB'], 'maxFileSize'=>2000, //2mb 'fileActionSettings'=>[ 'showZoom' => true, 'showRotate' => false, 'showRemove' => false, ] ] ] ],

    opened by lordrebs 1
  • Some translations in Spanish are missing

    Some translations in Spanish are missing

    Hello.... some texts in Spanish file are still in English. How can I contribute so that all of the messages appear in Spanish? I am using the CDN version so it is important es.js file to be fixed with the right messages.

    Cheers Jaime

    opened by jaimestuardo 1
  • Required Validation 2 (Ajax) not working

    Required Validation 2 (Ajax) not working

    Use "Required Validation 2 (Ajax)" sample https://plugins.krajee.com/file-count-validation-demo#required-ajax-2 init had file or remove init file and select file , but always show error message "No valid data available for upload.".

    opened by chkuo2 3
  • Update fileinput.js overriding default options

    Update fileinput.js overriding default options

    Adding default options override option for: $.extend($.fn.fileinput.defaults, {theme: 'fa4'});

    Scope

    This pull request includes a

    • [ ] Bug fix
    • [x] New feature
    • [ ] Translation

    Changes

    The following changes were made

    Related Issues

    If this is related to an existing ticket, include a link to it as well.

    enhancement 
    opened by zanysoft 0
  • filepreupload event wrong index and undefined fileId when uploading folder

    filepreupload event wrong index and undefined fileId when uploading folder

    Prerequisites

    • [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
    • [x] The issue still exists against the latest master branch of bootstrap-fileinput.
    • [x] This is not an usage question. I confirm having read the plugin documentation and demos.
    • [x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
    • [x] I have attempted to find the simplest possible steps to reproduce the issue.
    • [ ] I have included a failing test as a pull request (Optional).

    Steps to reproduce the issue

    1. Setup the library with a webkitdirectory input
    2. Add the filepreupload event
    3. Inspect index and fileId parameters

    Demo : https://jsfiddle.net/groseb/Lp2wb8rg/3/

    Expected behavior and actual behavior

    When I follow those steps, I see the index always the same and the fileId undefined.

    I was expecting the index and the fileId to have the correct values.

    For context I'm using the event to append a path to the formdata to upload to a given directory. I need the fileId to get its webkitRelativePath and construct the correct path for each file. All I could use now is the previewId which is not practical at all and the size of the file but it's not reliable as I could have two files with the same size.

    Thanks for your help

    Environment

    Browsers

    • [x] Google Chrome
    • [x] Mozilla Firefox
    • [ ] Internet Explorer
    • [ ] Safari

    Operating System

    • [ ] Windows
    • [ ] Mac OS X
    • [ ] Linux
    • [ ] Mobile

    Libraries

    • jQuery version: any
    • bootstrap-fileinput version: 5.5.1

    Isolating the problem

    • [ ] This bug happens on the plugin demos page
    • [ ] The bug happens consistently across all tested browsers
    • [x] This bug happens when using bootstrap-fileinput without other plugins
    • [x] I can reproduce this bug in a jsbin
    opened by groseb 0
Releases(v5.5.2)
  • v5.5.2(Oct 13, 2022)

    version 5.5.2

    Date: 13-Oct-2022

    • (bug #1822): Correct file type tokenizer parsing.
    • (enh #1821): Update Indonesian Translations.
    • (enh #1819): Update Chinese Translations.
    • (enh #1817): Fix invalid signature detection.
    Source code(tar.gz)
    Source code(zip)
  • v5.5.1(Aug 17, 2022)

    Date: 17-Aug-2022

    • (enh #1809, #1810): Correct minified plugins file "filetype.min.js".
    • (enh #1803): Add image/vnd.dwg signature.
    • (bug #1802): Fix SassError Invalid parent selector.
    • (bug #1782): Fix loading indicator reset for same file selected again.
    Source code(tar.gz)
    Source code(zip)
  • v5.5.0(Jun 29, 2022)

    Major Release: BC Breaking

    Date: 29-Jun-2022

    • (enh #1800): Styling enhancements for thumbnail content and rotatable images.
    • (enh #1799): Correct translations containing {maxSize}, {minSize}, {size}.
    • (enh #1796): Add two new Font Awesome 6.x themes.
      • fa6
      • explorer-fa6
    • (enh #1795): Refactoring and renaming of all Font Awesome based themes.
      • Refactor and rename fa theme to fa4
      • Refactor and rename fas theme to fa5
      • Refactor and rename explorer-fa theme to explorer-fa4
      • Refactor and rename explorer-fas theme to explorer-fa5
    • (enh #1792): Advanced file mime type detection for preview irrespective of file extension.
      • Load the following new plugin files before fileinput.min.js
    <!-- buffer.min.js and filetype.min.js are necessary in the order listed for advanced mime type parsing and more correct
         preview. This is a feature available since v5.5.0 and is needed if you want to ensure file mime type is parsed 
         correctly even if the local file's extension is named incorrectly. This will ensure more correct preview of the
         selected file (note: this will involve a small processing overhead in scanning of file contents locally). -->
    <script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/plugins/buffer.min.js" type="text/javascript"></script>
    <script src="https://cdn.jsdelivr.net/gh/kartik-v/[email protected]/js/plugins/filetype.min.js" type="text/javascript"></script>
    
    • (enh #1791): Enhance preview update automatically when addToStack is called.

    • (enh #1785): Image rotation button action feature in thumbnail and zoom.

      • New property rotatableFileExtensions defaults to ['jpg', 'jpeg', 'png', 'gif'],
      • New properties in fileActionSettings (rotateIcon, rotateTitle, rotateClass)
      • New properties previewZoomButtonIcons.rotate, previewZoomButtonClasses.rotate and previewZoomButtonTitles.rotate
    • (enh #1788): Enhancements to showUserError method.

      • New 3rd parameter retainErrorHistory which allows you to retain previous errors (defaults to false)
    var $input = $('#file-input-id');
    $input.on('fileuploaderror', function(event, data) {
      var userMessage = 'We could not process the upload because of a server error.',
          retainErrorHistory = true; // whether to retain error history
      // to show error specific to each file pass `data` as received above (the `data` object must contain the `fileId` property)
      $input.fileinput('showUserError', userMessage, data, retainErrorHistory);
    
      // to show a constant global error not specific to each file do not pass `data` (uncomment below line to achieve this)
      // $input.fileinput('showUserError', userMessage); 
    });
    
    • (enh #1694): Thumbnail of images only but detailed preview/iconic view of all other files.
      • New property alwaysPreviewFileExtensions - setup as an array list of extensions whose content will always be shown in preview (irrespective of preferIconPreview or previewFileIconSettings which will be used to control icon preview for configured types).
    Source code(tar.gz)
    Source code(zip)
  • v5.2.8(May 10, 2022)

    Date: 10-May-2022

    • (enh #1787): Enhance image size validation messages.
    • (enh #1786): Correct Uzbek Cyrillic Translation file name.
    • (enh #1784): Correct documentation for layoutTemplates.fileIcon.
    • (bug #1783): Correct image size validation checks (for min and max width/height).
    • (enh #1782): Correct loading indicator reset for file selection.
    • (bug #1780): Correct autoReplace behavior to clear already uploaded thumbnails.
    • (enh #1779): New plugin method showUserError and new event fileusererror. Usage:
    var $input = $('#file-input-id');
    $input.on('fileuploaderror', function(event, data) {
      var userMessage = 'We could not process the upload because of a server error.';
    
      // to show error specific to each file pass `data` as received above (the `data` object must contain the `fileId` property)
      $input.fileinput('showUserError', userMessage, data);
    
      // to show a constant global error not specific to each file do not pass `data` (uncomment below line to achieve this)
      // $input.fileinput('showUserError', userMessage); 
    });
    
    • (enh #1777): Ensure alt property for image is applied via intial preview config if set.
    • (bug #1775): Correct syntax error for Danish translations.
    • (bug #1773): Fix blank preview issue for large files > maxFilePreviewSize.
    • (enh #1771): Human readable sizes in messages like msgSizeTooLarge.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.7(Dec 17, 2021)

    Date: 17-Dec-2021

    • (enh #1767): Enhance ajax task queuing to validate maxAjaxThreads correctly.
      • enhancement for async uploads (with correct firing of events filebatchuploadsuccess and filebatchuploaderror)
    • (enh #1765): Map missing icons in gly theme.
    • (enh #1763): Preview centering enhancements for thumbnail, object and zoom content.
    • (bug #1758): Correct bootstrap module parser.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.6(Sep 23, 2021)

    Date: 23-Sep-2021

    • (bug #1758): Correct bootstrap module parser.
    • (enh #1756): Replace getLoadingUrl to a new $h.getZoomPlaceholder method.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.5(Sep 19, 2021)

  • v5.2.4(Sep 18, 2021)

    Date: 17-Sep-2021

    • (enh #1754): Default button styling & Explorer theme enhancements.
    • (enh #1753): Enhance NPM module handling.
    • (enh #1752): Enhance exif properties validation .
    • (enh #1750): Enhancements to file caption icon and input group styling.
    • (enh #1744): Enhance zoom cache temporary url to use loader image.
    • (enh #1741): Fix zoom cache 404 console warnings.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.3(Jul 25, 2021)

    Date: 25-Jul-2021

    • (enh #1738): Enhancements to zoomed preview to include additional description and better title styling.
      • The initialPreviewConfig will include an additional property description
      • The modal layout template will include a kv-zoom-description container which will render the description from initialPreviewConfig. This container will be hidden if no description found.
      • The modal layout template will include kv-zoom-caption container which will render the caption or filename from initialPreviewConfig. If that is not found it will default to msgZoomModalHeading.
      • The modal layout template will include kv-zoom-size container which will render the size as set in initialPreviewConfig.
      • The description will be shown as a bubble text over the image/content.
      • Additional new property showDescriptionClose (boolean). Will show a close icon to close the description bubble text when set to true. Defaults to true.
    • (enh #1737): Configurable file size units and bitrate units. New plugin properties configurable and translateable via locale language files.
      • sizeUnits defaults to ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
      • bitRateUnits defaults to ['B/s', 'KB/s', 'MB/s', 'GB/s', 'TB/s', 'PB/s', 'EB/s', 'ZB/s', 'YB/s']
    • (enh #1736): Correct byte to KB conversion.
      • new property bytesToKB which defaults to 1024 is used for conversion.
    • (enh #1735): Correct file caption reset after thumbnail delete.
    • (bug #1734): Correct zoom data refresh for each individual file upload.
    • (enh #1731): Enhance RTL Styling for bootstrap 4/5 input groups.
    • (enh #1730): Enhancements for bootstrap input group styles.
      • New plugin option inputGroupClass - defaults to empty string
      • Can be set to input-group-lg or input-group-sm to get bootstrap input group styles
      • Enhanced caption icon styling to match the bootstrap input group styles
    • (enh #1727): Correct zoom navigation for reverse preview order.
    • (enh #1726): Update Chinese translations.
    • (enh #1722): Enhance zoom cache rendering and carousel navigation indicators.
    • (enh #1721): Correct fileselect event triggering.
    • (enh #1720): Enhance parsing of zoomData to lazy load content asynchronously only on zoom.
    • (enh #1642): Enhance filebatchpreupload event listening for effective aborting.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.2(Jun 19, 2021)

    Date: 19-Jun-2021

    • (enh #1719): Show loading / processing when browse button used for file selection
    • (enh #1718): Enhancements for Bootstrap 5.x & New Theme
      • Default to use bootstrap 5.x icons instead of glyphicons
      • Correct layoutTemplates.main2 to use wrapper container for the buttons to use mainClass
      • Create a new theme bs5 to support bootstrap 5.x icons and styles
      • This is a BC breaking change - which will remove GLYPHICONS as default icons and replace them with Bootstrap 5.x Icon Library. Users must load the Bootstrap icons CSS on their pages for this new change to take effect (as mentioned in docs).
    • (enh #1716): Update Czech Translations.
    • (enh #1715): Update Slovak Translations.
    • (enh #1714): Various enhancements to file caption styling and file preview processing.
    • (enh #1713): Allow pasting files and images from clipboard to the fileinput.
    • (enh #1710): Correct isEmpty helper.
    • (bug #1709): Corrections to image resizing.
    • (bug #1708): Corrections to reselection/upload of image file deleted earlier.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.1(May 19, 2021)

    Date: 19-May-2021

    • (enh #1705): Enhance reset of file caption title.
    • (enh #1705): Corrections to image resizing.
    • (enh #1704): Enhance and fix CDN to use jsDelivr.
    Source code(tar.gz)
    Source code(zip)
  • v5.2.0(May 6, 2021)

    Date: 06-May-2021

    • (enh #1674): Enhancements to add support for Bootstrap v5.
      • Major release to support Bootstrap version 5.x
      • Bootstrap version is auto detected with this release if the bootstrap javascript library is loaded
      • Additional flexibility is provided to developer to override a specific bootstrap version by setting $.fn.fileinputBsVersion
      • There is an existing issue for MODAL dialog initialization in Bootstrap library v5.x. Refer the issue reported at the Bootstrap 5.x library repo with a workaround.
    • (enh #1699): Update Danish Translations.
    • (enh #1698): Tab index ordering enhancements.
      • fix tab order breaking after file caption highlight
      • added new property tabIndexConfig for configuration of tab indices for each section which defaults to (null value means no tabindex property will be set for that section)
        tabIndexConfig: {
            caption: 500,
            browse: 500,
            remove: 500,
            upload: 500,
            cancel: null,
            pause: null,
            modal: -1
        }
    
    • (enh #1693): Add Latvian Translations.
    • (enh #1690): Add Uzbek Cyrillic Translations.
    • (enh #1647, #1679, #1695): Correct success file thumbs init.
    Source code(tar.gz)
    Source code(zip)
  • v5.1.5(Mar 2, 2021)

    Date: 03-Mar-2021

    • (enh #1687, #1688): Allow error history to be displayed for resumable uploads.
      • new boolean property resumableUploadOptions.retainErrorHistory
    • (enh #1683): Better correct CSP Buffer Stash using CSSStyleDeclaration.
    • (enh #1681): Update Turkish Translations.
    • (bug #1678): Resumable upload error handling fixes
      • new boolean property resumableUploadOptions.skipErrorsAndProceed
      • new event filemaxretries
    Source code(tar.gz)
    Source code(zip)
  • v5.1.4(Jan 12, 2021)

    Date: 12-Jan-2021

    • (enh #1672): Add namespace control on bootstrap modal show trigger to avoid interaction with other plugins.
    • (bug #1671): Correct upload button behavior in file thumbnail footer.
    • (enh #1664): Enhance upload stats and add bitrate update delay.
    • (enh #1663): Correct upload bitrate.
    • (enh #1657, #1659): Update Hungarian Translations.
    • (bug #1656): Correct error in _getThumbFileId.
    • (bug #1652): Correct thumb parsing error for events when showPreview is false.
    • (enh #1651): Pass file id in fileuploaded event for non-resumable ajax async uploads.
    • (enh #1650): Update Ukranian Translations.
    • (bug #1649): Correct image size validation.
    • (enh #1648): New plugin method getFilesSize to return sum of bytes of all files.
    • (enh #1645): Update Polish Translations.
    • (bug #1123): Fix clickable zone behavior on file validation error.
    Source code(tar.gz)
    Source code(zip)
  • v5.1.3(Oct 23, 2020)

    Date: 24-Oct-2020

    • (enh #1644): Fix problem with outlook deleting email after drag and drop.
    • (enh #1643): Update Arabic Translations.
    • (enh #1640): Update Greek Translations.
    • (enh #1639): Update Greek Translations.
    • (enh #1638): Correct zoom cache to prevent duplicate thumb frames display.
    • (enh #1637): Remove dependency on DOM Purify Plugin.
    • (enh #1636): Enhance preview for PDF, Text & HTML.
    • (enh #1635): Enhance Text & HTML files initial preview to be read as links.
    • (bug #1632): Correct preview for plain text content.
    • (bug #1631): Correct modal dialog aria-labelledby binding.
    • (enh #1630): New preProcessUpload callback that can convert / encrypt file content before upload.
    • (enh #1627): Add bootstrap 4 progress bar animation.
    • (enh #1625): Default minFileSize to -1 to allow zero byte files to be uploaded.
    • (enh #1617): Better encoded file id generation.
    • (enh #1612, #1614): Remove unsupported script-inline from template and CSP buffer.
    Source code(tar.gz)
    Source code(zip)
  • v5.1.2(Jul 15, 2020)

    Date: 15-Jul-2020

    • (enh #1604): Correct upload stats time calculation for sync uploads.
    • (enh #1603): Add Serbian Latin Translations.
    • (enh #1602): Enhance zoom cache sanitization by parsing all inputs.
    • (enh #1595): Enhance styling for drop zone to maintain consistent size during file selections.
    • (bug #1594): Correct removeThumb validation for in readFiles throwError method.
    • (enh #1593): Correct resumable test upload validation.
    • (enh #1591): Parse arguments as an array via vanilla JS.
    • (enh #1589): Correct msgPlaceholder for de & uz translations.
    • (enh #1588): Enhance duplicate validation for recently uploaded thumbs.
    Source code(tar.gz)
    Source code(zip)
  • v5.1.1(Jun 20, 2020)

  • v5.1.0(Jun 11, 2020)

    Date: 11-Jun-2020

    • (enh #1584): Revamp Krajee Explorer Themes.
    • (bug #1583): Correct cspBuffer stash html content store.
    • (enh #1582): Set showConsoleLogs to false as default.
    • (enh #1581): Enhance Sortable Behavior & Styles.
      • Update to use latest release of Rubaxa Sortable Plugin
      • Fix errors in sortable init
      • Update drag handle styles to show correct grab cursor
    • (enh #1580): Validate drop zone title by correctly checking if native input has files.
    • (enh #1578): Enhance progress bar styling.
    • (enh #1577): Use &hellip; instead of three dots.
    • (enh #1576): Update French Translations.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.9(Jun 2, 2020)

    Date: 02-Jun-2020

    • (enh #1574): Enhance filezoom events to fire correctly only once for the source file input.
      • fixes issue when multiple file input plugins are initialized on the same page
    • (enh #1573): Update French Translations.
    • (enh #1572): Correct image auto orientation based on browser support.
    • (bug #1565, #1571): Implement CSP compliance for HTML markup via templates.
    • (bug #1569): Correctly validate persistent file validation errors and display them.
    • (enh #1568): Correct timeout and resumable validation for async uploads.
    • (enh #1536, #1567): Parse response as string in _parseError function.
    • (enh #1525, #1566): Handle filebeforeload event abort when returning false.
    • (enh #1563): Update Català Translations.
    • (enh #1561): Correct triggering of events for cancelled & paused scenarios.
    • (enh #1557, #1559): Enhance and fix resumable and ajax queues.
    • (enh #1552, #1553): More correct full screen exit.
    • (bug #1551): Correct MIME Type detection for PNG.
    • (enh #1548): Correct filebatchselected trigger for single file uploads.
    • (enh #1545, #1546): Enhance file path for folder drag.
    • (enh #1540): Better validation of required property.
    • (bug #1518, #1522): Initial preview rendering correction when preview returned by server immediately after upload.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.8(Dec 13, 2019)

    Date: 13-Dec-2019

    • (enh #1514): Enhancements to duplicate file selection.
      • New event fileduplicateerror will be triggered after every duplicate file detected.
      • Duplicate error container can be closed by clicking the close icon.
      • New property fadeDelay used in fade out / fade in animations of error containers.
    • (enh #1513): New filebeforeload event (only for ajax uploads). Can be used to abort loading of specific files at runtime. Usage:
        $('#input').on('filebeforeload', function(event, file, index, reader) {
            // perform your validations based on the 'file' or other parameters
            if (file.name === 'UNAPPROVED_FILE.txt') {
                return false; // will abort the file loading for the selected file
            }
        });
    
    • (enh #1512): Include parameter to include initial preview files in getFilesCount method.
    • (bug #1510): Lock browse button correctly when disable method is called.
    • (bug #1509): Correct zoom slideshow to show only files with zoom enabled via showZoom.
    • (bug #1508): Correct file caption after files are uploaded.
    • (enh #1503): Correct Mozilla PDF rendering bug.
    • (bug #1499, #1502): Correct duplicate file check error rendering.
    • (enh #1497): Better validation of progress display when showPreview is false.
    • (bug #1482): Validate initialPreviewShowDelete setting correctly.
    • (bug #1480): Correct preview content setting after validation error.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.7(Nov 17, 2019)

    Date: 17-Nov-2019

    • (enh #1496): Correct isEmpty check for functions.
    • (enh #1485): Update Portugese Brazilian Translations.
    • (enh #1479): Methods updated:
      • Include addToStack method.
      • Remove updateStack method
      • Rename clearStack to clearFileStack method
    • (enh #1478): Update Slovak Translations.
    • (enh #1477): Update Czech Translations.
    • (enh #1476): Update Hungarian Translations.
    • (enh #1475): Prevent invalid thumb validation when showPreview is false.
    • (enh #1474): Hide upload icon for file validation errors.
    • (enh #1471): Improve pt-PT and pt-BR translations.
    • (enh #1468): Update Uzbek Translations.
    • (enh #1467): Update Czekh Translations.
    • (enh #1466): Update Slovak Translations.
    • (bug #1465): Correct content.length parsing issue in preview cache.
    • (enh #1461): Allow two different max file count checks.
      • maxFileCount and msgFilesTooMany for files being selected before upload
      • maxTotalFileCount and msgTotalFilesTooMany for total files selected and files included in initial preview
    • (enh #1448): New boolean properties focusCaptionOnBrowse and focusCaptionOnClear which default to true.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.6(Sep 11, 2019)

    Date: 11-Sep-2019

    • (enh #1464): Correct preview frame float styling issues.
    • (bug #1463): Correct file input unlock after file validation errors (for non-ajax mode).
    • (bug #1460): Correct filebatchselected event trigger.
    • (bug #1459): Upload Async does not recognize initialPreview correctly for ajax response immediately sent with uploadUrl.
    • (bug #1457): Correct removeFromPreviewOnError validation.
    • (enh #1455): Default preview template to other when invalid file type is passed.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.5(Aug 23, 2019)

    Date: 23-Aug-2019

    • (enh #1450): Update Russian Translations.
    • (enh #1449): Lock file input while files are being read for preview.
    • (enh #1446): New property showConsoleLogs to control display of plugin console messages.
    • (enh #1445): Correct invalid thumb frame log errors.
    • (enh #1442): Implement .npmignore to clean unwanted files for NPM package.
    • (enh #1438): Activating Open Collective.
    • (enh #1436): Improve Portuguese translations.
    • (enh #1435): Handle special characters in file thumb id attribute.
    • (enh #1429): Enhance thumbnail preview identifiers.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.4(Jun 30, 2019)

    Date: 30-Jun-2019

    • (enh #1422): Correct drag indicator SCSS.
    • (enh #1420): Correct preferIconicPreview parsing.
    • (bug #1413): Correct getFileStack and getFileList methods.
    • Implement sponsorship.
    • Implement sentiment bot.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.3(May 12, 2019)

    Date: 12-May-2019

    • (enh #1409): Correct the sequence of raise of filechunksuccess event.
    • Implement stale bot.
    • (enh #1400): Enhance image auto orientation for zoom images when thumbnail is hidden.
    • (enh #1399): Enhance Krajee Explorer themes for better image preview.
    • (enh #1398): Resumable uploads enhancements (only when enableResumableUpload is true):
      • Add new properties to fileActionSettings:
        • indicatorPaused
        • indicatorPausedTitle
      • Enhance pause and resume behavior by showing appropriate indicators on the file thumbnails
      • Add resume method and enhance pause method for resumable uploads
      • Remove upload button from individual thumbnails and ability to upload selective single file for resumable uploads.
    • (enh #1397): Correct uploadParamNames to include all parameters.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.2(Apr 18, 2019)

    Date: 18-Apr-2019

    • (enh #1394): New error message properties (updates to locales).
      • msgProgressError
      • msgDeleteError
      • msgUploadError (modification)
    • (enh #1393): Standardize error alert formats for ajax deletes.
    • (enh #1136): Allow proper retry of error uploads based on retryErrorUploads setting.
    • Better management of console log messages.
    • (bug #1391): Correct resumable upload progress update behavior when showPreview is false.
    • (bug #1390): Correct remove button display validation set via fileActionSettings.
    • (bug #1385): Correct resize image error.
    • (bug #1383): Validate for undefined zoom data.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.1(Mar 26, 2019)

    Date: 26-Mar-2019

    • (enh #1382): Better defaults for resumableUploadOptions.chunkSize and progressDelay.
      • Set defaults for progressDelay to 0 and resumableUploadOptions.chunkSize to 2048 KB i.e. (2 MB)
    • (bug #1381): Fix uploadExtraData to be submitted correctly with ajax responses.
    • (enh #1379): Add ability to sanitize zoom cache. New property sanitizeZoomCache which is a function callback and defaults to:
      function(content) {
          var $container = $(document.createElement('div')).append(content);
          $container.find('input,select,.file-thumbnail-footer').remove();
          return $container.html();
      }
      
    • (enh #276): Add ability to change ajax submission URL dynamically e.g. uploadUrl, deleteUrl, resumableUploadOptions.testUrl. These can now be also setup as a function callback that will be executed at runtime.
    Source code(tar.gz)
    Source code(zip)
  • v5.0.0(Mar 24, 2019)

    MAJOR RELEASE

    Date: 24-Mar-2019

    • (enh #1378): Allow throttling / delaying xhr progress updates.
      • New property uploadProgressDelay in microseconds - will default to 100 - this will control how frequent the xhr upload progress will be checked. If set to null or 0 - will do it every microsecond.
      • New property maxAjaxThreads (will default to 5) that will allow to spawn only this limit of ajax requests in parallel.
      • The above is complemented by resumableUploadOptions['maxThreads'] (defaults to 4) which is applicable for spawning number of ajax chunk requests for resumable uploads. The resumableUploadOptions['maxThreads'] property must be less than or equal to maxThreads - else it will be over-ridden by maxThreads global setting.
    • (enh #1377): Display extended upload statistics like bitrate and pending time.
      • add layoutTemplates['stats'] for displaying stats
      layoutTemplates.stats = '<div class="text-info file-upload-stats">' +
          '<span class="pending-time">{pendingTime}</span> ' +
          '<span class="upload-speed">{uploadSpeed}</span>' +
          '</div>';
      
      • token {stats} will be replaced with above
      • by default '{stats}' will be appended at the end of layoutTemplates['progress']
      • display pending time remaining and upload speed within stats
      • enhance xhr progress to support updating stats
    • (enh #1374): Allow exif data of images to be read from server.
      • initialPreviewConfig sent from the server can contain the exif property as an object.
      • allows auto orientation of JPEG image files based on exif orientation
      • autoOrientImageInitial is a new boolean property that controls whether images need to be auto-oriented based on exif orientation.
    • (enh #1373): Selectively disable file selection and preview for certain file extensions. - allowedPreviewTypes (existing) - allowedPreviewMimeTypes (existing) - allowedPreviewExtensions (new) - disabledPreviewTypes (new) - disabledPreviewExtensions (new) - defaults to ['msi', 'exe', 'com', 'zip', 'rar', 'app', 'vb', 'scr'] - disabledPreviewMimeTypes (new) - defaults to ['application/octet-stream']
    • (enh #1370): Add ability for pausing and resuming uploads
    • (enh #1368): Better enhanced file management and queuing.
      • New fileManager and resumableManager internal objects.
      • filestack property has been removed
      • addToFileStack and updateFileStack methods have been removed
    • (enh #1321): Add ability to define separate thumbnail and zoom images / file data.
    • (enh #1264, #1145): Allow configurable file actions as a callback.
      • The showXXX properties in fileActionSettings ca3n now be setup as a callback.
      • Can read any property from the initialPreviewConfig for initial preview thumbnails
    • (enh #1249, #290): Add capability for resumable and chunk uploads.
      • New properties enableResumableUpload and resumableUploadOptions
    Source code(tar.gz)
    Source code(zip)
  • v4.5.3(Mar 21, 2019)

    Date: 21-Mar-2019

    • (enh #1371): Capture file identifier in thumbnails
    • (enh #1367, #1286): Better validation of piexif.js and other code enhancements.
    • (enh #1362, #1337, #1269): AutoOrientImage enhancement for mobile safari.
    • (enh #1336): Ability to configure alt and title attributes for images in initialPreviewConfig.
    Source code(tar.gz)
    Source code(zip)
  • v4.5.2(Jan 3, 2019)

    Date: 03-Jan-2019

    • (enh #1342): Update Turkish Translations.
    • (enh #1339): Better validation of createObjectURL and revokeObjectURL.
    • Update examples\index.html to use latest jQuery, Bootstrap & Font Awesome libraries.
    • (enh #1333): Update Galician Translations.
    • (enh #1332): Update Chinese Translations.
    • (enh #1325): Update README for NPM install.
    • (bug #1324): Error in IE11 Folder drag and drop.
    • (enh #1322): Add Uzbek Translations.
    • (enh #1320): New events for files dragged and dropped.
    • (enh #1319): Enhance mimeType parsing via mimeTypeAliases.
      • allows quicktime .mov files to be previewed in non Apple browsers like Chrome/Firefox/IE.
    • (enh #1318): Configure PDFjs viewer for IE11 pdf preview.
    • (enh #1314): Update Hebrew Translations.
    • (enh #1313): Correct file type function validation.
    • (enh #1311): Correct preview zoom modal keydown next and prev keyboard behavior.
    • (enh #1308): Enhance audio file preview thumbnail styling.
    • (enh #1298): New encodeUrl boolean option that encodes all URL passed by default.
    Source code(tar.gz)
    Source code(zip)
A Bootstrap plugin to create input spinner elements for number input

bootstrap-input-spinner A Bootstrap / jQuery plugin to create input spinner elements for number input. Demo page with examples Examples with floating-

Stefan Haack 220 Nov 7, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Nepali Multi Date Picker for jQuery. Supports both single date selections and multiple date selection.

Nepali Multi Date Picker A simple yet powerful date picker based in Nepali calendar. Supports both single date selections and multiple date selection.

Sanil Shakya 4 May 23, 2022
Extends Bootstrap Tooltips and Popovers by adding custom classes. Available for Bootstrap 3 and Bootstrap 4.

Bootstrap Tooltip Custom Class Extends Bootstrap Tooltips and Popovers by adding custom classes. Available for Bootstrap 3 and Bootstrap 4. Define you

Andrei Victor Bulearca 14 Feb 10, 2022
Codebraid Preview provides a Markdown preview for Pandoc documents within VS Code.

Codebraid Preview provides a Markdown preview for Pandoc documents within VS Code. Most Markdown previews don't support all of Pandoc's extensions to Markdown syntax. Codebraid Preview supports 100% of Pandoc features—because the preview is generated by Pandoc itself! There is also full bidirectional scroll sync and document export.

Geoffrey Poore 12 Dec 28, 2022
Get an isolated preview database for every Netlify Preview Deployment

Netlify Preview Database Plugin Create an isolated preview database for each preview deployment in Netlify Quickstart • Website • Docs • Discord • Twi

Snaplet 10 Nov 16, 2022
A simple Form Validation Utility for Bootstrap 3, Bootstrap 4, and Bootstrap 5 for Humans.

bootstrap-validate A simple Form Validation Utility for Bootstrap 3, Bootstrap 4, and Bootstrap 5 for Humans. ?? Support us with Developer Merchandise

null 138 Jan 2, 2023
Enhanced interval features for Node.js, such as promisified interval and human readable time parsing.

Interval-next Interval-next is a package that extends Javascript's built-in setInterval() capabilities. You have a plain and promisified interval meth

Snowy 5 Jul 28, 2022
A phone input component that uses intl-tel-input for Laravel Filament

Filament Phone Input This package provides a phone input component for Laravel Filament. It uses International Telephone Input to provide a dropdown o

Yusuf Kaya 24 Nov 29, 2022
Bootstrap 5 spinner/loading/pending indicator for ,