An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
Date: 02-Jun-2020
_parseError
function.filebeforeload
event abort when returning false
.filebatchselected
trigger for single file uploads.required
property.Date: 13-Dec-2019
fileduplicateerror
will be triggered after every duplicate file detected.close
icon.fadeDelay
used in fade out / fade in animations of error containers.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
}
});
getFilesCount
method.showZoom
.showPreview
is false
.initialPreviewShowDelete
setting correctly.Date: 17-Nov-2019
addToStack
method.updateStack
methodclearStack
to clearFileStack
methodshowPreview
is false
.maxFileCount
and msgFilesTooMany
for files being selected before uploadmaxTotalFileCount
and msgTotalFilesTooMany
for total files selected and files included in initial previewfocusCaptionOnBrowse
and focusCaptionOnClear
which default to true
.Date: 11-Sep-2019
filebatchselected
event trigger.removeFromPreviewOnError
validation.other
when invalid file type is passed.Date: 23-Aug-2019
showConsoleLogs
to control display of plugin console messages..npmignore
to clean unwanted files for NPM package.Date: 30-Jun-2019
preferIconicPreview
parsing.getFileStack
and getFileList
methods.Date: 12-May-2019
filechunksuccess
event.enableResumableUpload
is true
):
indicatorPaused
indicatorPausedTitle
resume
method and enhance pause
method for resumable uploadsuploadParamNames
to include all parameters.Date: 18-Apr-2019
msgProgressError
msgDeleteError
msgUploadError
(modification)retryErrorUploads
setting.showPreview
is false
.fileActionSettings
.Date: 26-Mar-2019
resumableUploadOptions.chunkSize
and progressDelay
.
progressDelay
to 0
and resumableUploadOptions.chunkSize
to 2048 KB
i.e. (2 MB
)uploadExtraData
to be submitted correctly with ajax responses.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();
}
uploadUrl
, deleteUrl
, resumableUploadOptions.testUrl
.
These can now be also setup as a function callback that will be executed at runtime.Date: 24-Mar-2019
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.maxAjaxThreads
(will default to 5
) that will allow to spawn only this limit of ajax requests in parallel.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.layoutTemplates['stats']
for displaying statslayoutTemplates.stats = '<div class="text-info file-upload-stats">' +
'<span class="pending-time">{pendingTime}</span> ' +
'<span class="upload-speed">{uploadSpeed}</span>' +
'</div>';
{stats}
will be replaced with abovelayoutTemplates['progress']
initialPreviewConfig
sent from the server can contain the exif
property as an object.autoOrientImageInitial
is a new boolean property that controls whether images need to be auto-oriented based on exif orientation.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']
fileManager
and resumableManager
internal objects.filestack
property has been removedaddToFileStack
and updateFileStack
methods have been removedshowXXX
properties in fileActionSettings
ca3n now be setup as a callback.initialPreviewConfig
for initial preview thumbnailsenableResumableUpload
and resumableUploadOptions