Date: 17-Mar-2015
- (bug #171): Fix typo for files validation.
- (enh #167, #173): New
deleteExtraData
property for ajax deletions. - (enh #174): New
deleteUrl
property. - (enh #175): Ability to override delete extra data in
initialPreviewConfig
. - (enh #176): Wrong file in README installation steps fixed.
- (enh #177): Trigger filebatchpreupload if showPreview is
false
. - (enh #178): Updated README for cancel button configuration.
- (enh #179): Validate and cast
maxFileSize
andmaxFileCount
to numeric - even if they have been setup as a string. - (enh #181): Fix change event triggered for IE 11 when file input is set to empty.
- (enh #183): Delete extra data enhancements.
- (enh #184): Fix documentation for filedeleted event.
- (enh #187): New property
previewFileIcon
to configure file icon shown in preview for unreadable file types. - (enh #188): Clear fileinput more correctly for all browsers when initialPreview is set enhancement
- (enh #189): Reinitialize initial preview delete events correctly on file selection.
- (enh #192): Ability to extend and add one's own ajax settings.
- New property
ajaxDeleteSettings
to help extend and add to delete ajax settings. ajaxSettings
to help extend and add upload ajax settings
- New property
- (bug #193): Better validation for triggering
filebatchuploadcomplete
on async batch upload completion. - (enh #202): Ability to add Translations / Locales.
- Identify and group all messages that need to be translated configurable via
$.fn.fileinput.locales['<lang-code>']
- Set default english messages configuration
$.fn.fileinput.locales['en']
within the plugin core code - Individual locale files need to be created as separate js files e.g.
fileinput_locale_<lang>.js
- Identify and group all messages that need to be translated configurable via
- (enh #203): Enhancements and revamp of all error events.
- fileerror
- fileuploaderror
- filebatchuploaderror
- filedeleteerror
- filefoldererror (new event - see #209)
- filecustomerror (new event - see #206)
- (enh #204): New properties
fileMinCount
andmsgFilesTooLess
(useful to make file input mandatory).- The
fileMinCount
property will allow to set the minimum file count needed before triggering upload. It will work for bothajax
uploads andnormal form based submission
. - This will enable you to set the file input to be a mandatory / required input. (e.g.
fileMinCount
=1
). ThemsgFilesTooLess
will be displayed and error raised. - If
fileMinCount
is set to0
it will be treated as files are optional and no error will be triggered.
- The
- (enh #205): Allow to auto set initialPreview within
filebatchuploadcomplete
&filebatchuploadsuccess
.- Allows you to auto define the
initialPreview
andinitialPreviewConfig
after an ajax upload by returning these within the data object from your ajax response onfileuploaded
&filebatchuploadsuccess
.
- Allows you to auto define the
- (enh #206): Ability to add custom validation and trigger custom error to abort upload.
- This enhancement will enable you to add your additional custom validations to enhance the fileinput to be used for innumerous scenarios. It will allow an ability to return an associative object with any of the fileinput events (except the error events and the
filebatchuploadsuccess
orfilebatchuploadcomplete
) e.g.change
,fileselect
,filepreupload
,filebatchpreupload
etc. The object can return the following keys:message
: string, the validation error message to be displayed before upload. If this is set the plugin will automatically abort the upload whenever called and display this as an error message. You can use this property for example to read a file and perform your own custom validation.data
: object, an optional associative array of additional data that you can pass for usage later.
- You can get this data by reading
abortData
in the parameters for the newfilecustomerror
event. This new event will be triggered during upload, when you have triggered an abort from any of the other events.
- This enhancement will enable you to add your additional custom validations to enhance the fileinput to be used for innumerous scenarios. It will allow an ability to return an associative object with any of the fileinput events (except the error events and the
- (enh #209): Better validation for folder drag and drop and auto-skip any dropped folders. New property
msgFoldersNotAllowed
added to the plugin to allow configuring the message shown. The eventfilefoldererror
is triggered when a folder is dragged. - (enh #211): Add ability to show detailed server error stack via
showAjaxErrorDetails
. - (enh #212): Revamp preview to use a new preview caching object.
- (enh #213): Code cleanup, eliminate change event on clear and properly reset preview cache after ajax deletes.
- (enh #215): Set default delete method REST compliant.
Date: 13-Feb-2015
- (enh #149): Custom tags support for layoutTemplates and previewTemplates (new properties
customLayoutTags
andcustomPreviewTags
included). - (enh #151): New
filebatchselected
event triggered after every batch of files are selected. - (enh #152): New faster
replaceAll
method instead of regexp parsing to replace tags in templates. - (enh #153): Improve error handler for trapping FileReader security exceptions and new property
msgFileSecured
will display the security exception message. - (enh #154): Code cleanup and restructure for JS lint changes (using JSHint Code cleanup library).
- (enh #155): Allow display of long file names without spaces/word breaks.
- (enh #156): Fix reset of file stack for various upload modes (single, batch async and batch sync).
- (enh #157): Upload progress bar styling enhancements.
- Allow upload progress bar css class to be configurable
- Create and allow two different styles/css classes for progress bar
progressClass
: styling for progress bar when upload is in processprogressCompleteClass
: styling for progress bar when upload is complete
- (bug #159): Ensure filestack is passed correctly with
outData
for events. - (bug #160): Correct documentation typo for usage.
- (enh #162): New property ajaxSettings to allow configuring ajax params.
- Set copyright year to current.
- Relocate sample files from examples directory to bootstrap-fileinput-samples repo.
Date: 20-Jan-2015
- (enh #124): Allow submission of extra data even if no files are selected.
- (enh #131): Allow empty values in extra data to be submitted.
- (enh #136):Create new upload method that can be called externally.
- (enh #137): Trigger new events -
filedisabled
andfileenabled
. - (enh #139): Reset file stack correctly on ajax upload completion.
Date: 12-Jan-2015
- (bug #100, #101): Set right params for error thrown during reading of files.
- (bug #104): Fix formdata not defined.
- (enh #105): Expose current jqXHR object on ajax events.
- (enh #106): Enhance events for ajax requests and enable cancelling sync uploads
- (enh #108): Add nuget package.
- (bug #112): Fix undefined filestack for individual file upload within preview.
- (bug #113): Icon layout template undefined when using user template.
- (bug #114): Prevent multiple file selection when using single file configuration.
- (enh #115): Autosize file caption responsively on window resize.
- (enh #116): Hide remove and upload buttons until unless file(s) are selected.
- (enh #119): Enhance caption to include ellipsis for long file names
- (bug #120): Correct multiple iterations of upload for async batch uploads.
- (enh #121): Animate progress bars by default for upload progress.
Date: 26-Dec-2014
- (enh #88): Allow uploadExtraData to be passed as a callback.
- (enh #89): New
otherActionButtons
to allow adding customized initial preview content actions. - (enh #90): New event
filebatchpreupload
for both synchronous and asynchronous batch uploads. - (enh #91): Pass FileReader instance with outData in events.
- (enh #92): Realign event triggering timing for batch uploads to ensure outData is available.
- (enh #93): Better styling of file upload icon indicators in thumbnails.
- Code cleanup with reusable methods for event raising and outData generation.
- (bug #95): Correct event off for drag & drop in plugin refresh method.
- (bug #97): Reset events correctly with plugin refresh method.
Date: 20-Dec-2014
- (enh #85): Combine output data as a single object, that is sent for various file upload events.
filepreupload
fileuploaded
fileuploaderror
filebatchuploaderror
filebatchuploadsuccess
filebatchuploadcomplete
- (enh #86): Disable thumbnail action buttons when upload is in progress.
- (enh #87): More correct progress indicator percentage for asynchronous upload.
Date: 19-Dec-2014
- (enh #81): Add new events:
filebatchuploadsuccess
filebatchuploadcomplete
- (enh #80): Allow access to
uploadExtraData
andresponseData
to following eventsfilepreupload
fileuploaded
fileuploaderror
filebatchuploaderror
filebatchuploadsuccess
filebatchuploadcomplete
filelock
fileunlock
Date: 18-Dec-2014
- (bug #76): Update filestack when
showPreview
is false. - (bug #78): Set uploadExtraData parameters to be correctly sent via POST.
- (enh #58): Set a new property
textEncoding
for reading the text files with right encoding.
Date: 17-Dec-2014
- (enh #74): Enhancements to file validation errors for both FORM and AJAX uploads.
- For normal Form based uploads automatically disable the Upload button
- Display a separate error styled thumbnail for the file that faced the validation error.
- Reset errors correctly to overwrite files with a new change or drag/drop
- (enh #75): Better validation of browser support for drag and drop.
Date: 14-Dec-2014
- (enh #70): Version 4.0 enhancements.
- Renamed
initialDelimiter
toinitialPreviewDelimiter
- (bug #72): Fix bootstrap version constraint.
- Add functionality for AJAX based UPLOAD using HTML5 FormData (most modern browsers support it). Will degrade to normal Form Based File submission if this is not supported.
- To use AJAX Upload, the
uploadUrl
property is MANDATORY and must be set. - Enhance plugin to now allow files to be added, appended, removed (based on FEEDBACK from many). Thus one can append files to preview.
- New DRAG & DROP zone available in preview to drag and drop files and append.
- Delete or upload files one by one OR in batch.
- If
showPreview
is set to false, or uploadUrl is not supported plugin will degrade to normal form based upload. - Configurable indicators for file awaiting upload, file successfully uploaded, files errored in upload.
- Ability to add extra form data with ajax based uploads.
- Upload progress bar and individual thumbnail upload indicators.
- Ability to cancel and abort ongoing AJAX uploads.
- Templates have been revamped and enhanced for each file type.
- Ensure plugin is still lean in size and optimized for performance inspite of the above features by optimally utilizing HTML5 & jquery features only.
showCancel
: shows a cancel button for aborting ajax uploads (defaults totrue
).cancelLabel
: label for the cancel button.cancelTitle
: title for the cancel button on hover.cancelIcon
: icon markup for the cancel buttoncancelClass
: CSS class for the cancel button.removeTitle
: title for the remove button on hover.uploadTitle
: title for the upload button on hover.uploadUrl
: the url that will be used to process AJAX based uploads (using FormData XHR2).uploadExtraData
: extra data that will be passed as data to the url/AJAX server call via POSTuploadAsync
: whether the batch upload of multiple files will be asynchronous/in parallel. Defaults totrue
.initialPreviewShowDelete
: shows a delete button for each initial preview content's thumbnail (defaults totrue
).initialPreviewConfig
: configuration for setting up eachinitialPreviewContent
item (associative array/object)caption
: The caption or filename to display for each initial preview item content.width
: The CSS width of the image/content displayed.url
: The URL for deleting the image/content via AJAX (shown only forinitialPreviewContent
).key
: The key that will be passed to the URL via POST (shown only forinitialPreviewContent
).
dropZoneEnabled
: Enable a drag and drop zone for dragging files and is available only for ajax based uploads (defaults totrue
).dropZoneTitle
: Title to be displayed in the drag & drop zone.dropZoneTitleClass
: CSS class for the drag & drop zone title.fileActionSettings
: configuration for setting up actions for newly selected file thumbnails in the preview (associative array/object)removeIcon
: icon for remove button to be displayed in each file thumbnail.removeClass
: CSS class for the remove button in each file thumbnail.removeTitle
: title for remove button in each file thumbnail.uploadIcon
: icon for upload button to be displayed in each file thumbnail.uploadClass
: CSS class for the remove button in each file thumbnail.uploadTitle
: title for remove button in each file thumbnail.indicatorNew
: an indicator (HTML markup) for new pending upload displayed in each file thumbnail.indicatorSuccess
: an indicator (HTML markup) for successful upload displayed in each file thumbnail.indicatorError
: an indicator (HTML markup) for error in upload displayed in each file thumbnail.indicatorLoading
: an indicator (HTML markup) for ongoing upload displayed in each file thumbnail.indicatorNewTitle
: title to display on hover of indicator for new pending upload in each file thumbnail.indicatorSuccessTitle
: title to display on hover of indicator for successful in each file thumbnail.indicatorErrorTitle
: title to display on hover of indicator for error in upload in each file thumbnail.indicatorLoadingTitle
: title to display on hover of indicator for ongoing upload in each file thumbnail.
Date: 08-Dec-2014
- (enh #60): Enhance upload button for disable/enable when used with
<a>
tag. - (bug #61): Refresh preview to show errors correctly after each file is validated.
- (enh #64): Add ability to override the slug method with a
slugCallback
property. - (enh #65): Correct validation of
refreshPreview
usingupdateFileDetails
. - (enh #67): Enhance support for IE browsers
- Add specific validations for parsing IE versions rightly
- Enhance plugin to extend styling support to IE 9 (with the limitation that IE 9 does not support HTML 5 features like multiple file upload)
- Fix clearing of file input rightly for IE 9 & IE 10
- Degrade plugin automatically to a native file input for older IE versions
- Prevent change method firing twice when file is cleared after error is encountered in IE 11.
- (bug #68): Fix refresh method of the fileinput to trigger change correctly.
Date: 23-Nov-2014
- (enh #53): Validations and events for right reset of files when browse button is clicked.
- (enh #55): Clear the files when file browse dialog is cancelled only if the browser clears the native file input.
- (enh #56): Trigger new events
filebrowse
andfileselectnone
.
Date: 13-Nov-2014
- (enh #50): Dynamically auto size file captions for long file names exceeding container width. New property
autoFitCaption
is added which defaults totrue
. When this istrue
the plugin will auto fit caption text within the container dynamically and responsively based on window size. - (enh #51): Autosize preview images when they exceed the size of the preview container.
- (enh #52): Raise new
fileimageloaded
event.
Date: 11-Nov-2014
- Set release to stable in composer.json.
- (enh #48): Trigger
fileloaded
event whenshowPreview
isfalse
. - (enh #49): Set image preview dimensions to auto fit and center
Date: 15-Oct-2014
- (bug #40): More correct fix for IE (ver < 11) inability to clear fileinput values.
- Templatize errorContainer for display within the preview window.
- (enh #42): Enhance plugin to configure the
elErrorContainer
for displaying validation errors. - (bug #43): Validate special characters in filename before generating caption.
- (bug #44): Browser IE10 hangs on file clear.
Date: 09-Oct-2014
- (enh #36): New feature. Validation routine for checking allowed file types and extensions.
- (bug #37): HTML encode text content for preview in modal.
- (enh #38): Highlight error CSS in file caption on validation error.
- (bug #39): HTML encode caption hover title.
- (bug #40): Fix IE (ver < 11) inability to clear fileinput values.
Date: 20-Sep-2014
- (enh #30): Enhanced generic support for more preview formats (audio, video, html, flash, and other objects).
- (enh #31): Better control and configuration of preview templates.
- (enh #32): Added checks for file api support.
- (enh #33): Better text format validation and correct modal preview.
Note: There are BC Breaking Changes with release v2.4.0.
With release v2.4.0, the plugin has been revamped to support and configure a wide variety of file formats for preview. This may break some backward compatibility (BC) for older versions that use custom templates.
The following are the major changes with release v2.4.0:
- Plugin has been revamped to build preview intelligence based on various file preview types. The inbuilt file support types are categorized as
image
,text
,html
,video
,audio
,flash
,object
, andother
. allowedPreviewTypes
: You can now configure which all file types are allowed to be shown as a preview. This defaults to['image', 'html', 'text', 'video', 'audio', 'flash', 'object']
. Thus all file types are treated as an object to preview by default. For exampleTo preview onlyimage
andvideo
, you can set this to['image', 'video']
.allowedPreviewMimeTypes
: In addition toallowedPreviewTypes
, you can also control which all mime types can be displayed for preview. This defaults to null, meaning all mime types are supported.layoutTemplates
: Allows you to configure all layout template settings within one property. The layout objects that can be configured are:main1
,main2
,preview
,caption
, andmodal
.previewTemplates
: All preview templates for each preview type have been combined into one property, instead of separate templates for image, text etc. The keys are the formats as set inallowedPreviewTypes
and values are the templates used for previewing. There are default prebuilt templates for each preview file type (generic
,image
,text
,html
,video
,audio
,flash
,object
, andother
). Thegeneric
template is used only for displayinginitialPreview
content using direct markup.previewSettings
: Allows you to configure width and height for each preview image type. The plugin has default widths and heights predefined for each type i.eimage
,text
,html
,video
,audio
,flash
, andobject
.fileTypeSettings
: Allows you to configure and identify each preview file type using a callback. The plugin has default callbacks predefined to identify each type i.eimage
,text
,html
,video
,audio
,flash
, andobject
.- Replacing tags within templates has been enhanced. With this release it will automatically check for multiple occurrences of each tag to replace within a template string.
NOTE: Flash preview will require Shockwave flash to be installed and supported by the client browser. The flash preview currently works successfully with webkit browsers only. Video & Audio formats are however supported by all modern browsers that support the HTML5
video
/audio
tags. Note that browsers have limited number of video/audio formats supported by the HTML5 video element (e.g. mp4, webm, ogg, mp3, wav). The size of video files are recommended to be small (to be controlled throughmaxFileSize
property) so that it does not affect the preview performance. You can copy a few files from theexamples
directory of this plugin repo, to test a few examples of flash and video files.
Date: 19-Sep-2014
- (enh #28, #29): Added support for previewing flash and video files.
- Better replacement of tags in templates. Replaces all tag occurences with this new release.
Date: 19-Aug-2014
- (enh #24): Update readAsBinaryString to readAsArrayBuffer
- (enh #25): Graceful degrade to normal file input for older browsers (including previous versions of Safari).
Date: 11-Aug-2014
- (enh #16, #17): Added exception handling for trapping FileReader API errors
- New configuration property added:
maxFilesCount
. Defaults to0
which means unlimited. - New configurable error messages added:
msgFilesTooMany
,msgFileNotFound
,msgFileNotReadable
,msgFilePreviewAborted
, andmsgFilePreviewError
. - Enhanced plugin to improve browser performance when loading and previewing multiple image files.
- (enh #18): Better validation for older browsers (not supporting HTML5) to degrade to normal file input.
- (enh #19): Synchronize preview with file browse dialog behavior, when cancel button is pressed in file dialog window.
- (enh #20): Fix
fileloaded
event to incrementpreviewId
and enhance to return file index. - (enh #21): Enhance multiple file upload and preview performance using setTimeout.
- (enh #21): Enhance loading progress message and message templates for multiple file uploads.
- (enh #22): Enhance file caption message display for validation errors.
- Other minor bug fixes.
Date: 25-Jul-2014
- (enh #12, #13, #14): Various enhancements and fixes.
- (enh #15): Enhanced validation of file size through
maxFileSize
configuration. - New plugin events added:
fileerror
,fileloaded
,filecleared
. - New plugin methods added:
disable
,enable
- Enhanced configurable templates for previewing image, text, and other files (and a generic template).
- Make caption text configurable through a new parameter
msgSelected
. - Correct calculation of files selected when
initPreview
is false. - Automatic scale images for preview, when images are too wide to fit in container.
- Added delimiter option for
initialPreview
to pass multiple content delimited as a string.
Date: 21-Jul-2014
- (enh #9): Enhanced caption template and styling for captions to prevent overflow of long file names out of the caption container.
- (enh #10): Ability to display initial caption, when initialPreview is false.
Date: 15-Jul-2014
- (enh #9): Enhanced caption template and styling for captions to prevent overflow of long file names out of the caption container.
Date: 02-Jul-2014
- The plugin now offers an additional
overwriteInitial
option. This is by default set totrue
, whereby, anyinitialPreview
content set will be overwritten, when new file is uploaded or when files are cleared. Setting it tofalse
will help displaying a saved image or file from database always - useful especially when using themultiple
file upload feature.
Date: 03-Jun-2014
- The plugin now offers an additional
refresh
method. This enables you to dynamically change element attributes or plugin options at runtime and refresh the widget.
Date: 23-May-2014
- The plugin now offers an option to display initial preview of images/text/other files. This is useful for record update scenarios. This can be a single image/file or an array of images/files.
- Extending to the above feature, the plugin also allows you to set a preview caption for the initial preview field.
- The following element identifiers need to be passed as a string like '#id' instead of a JQuery object:
- elCaptionContainer
- elCaptionText
- elPreviewContainer
- elPreviewImage
- elPreviewStatus
Date: 01-Jan-2014
Initial release. The following features are included in this release:
- The plugin will convert a simple HTML file input to an advanced file picker control. Will help fallback to a file input for browsers not supporting JQuery or Javascript.
- The file input consists of the following three sections with options and templates to control the display:
- file caption section: to display a brief information of the file(s) selected
- file action buttons section: to browse, remove, and upload files.
- file preview section: to display the selected files on client for preview (supports images and text file types). Other file types will be displayed as normal thumbnails.
- The plugin automatically converts an input with
type = file
to an advanced file picker input if you set itsclass = file
. All options to the input can be passed as HTML5data
attributes. - Ability to select and preview multiple files. Uses HTML 5 File reader API to read and preview files. Displays the progress of files being being loaded onto the preview zone, in case many files are chosen.
- Offers predefined templates and CSS classes which can be changed to style your file-input display as per your needs.
- Option to show/hide any or all of the following:
- caption section
- preview section
- upload button
- remove button
- Customise the location of the target container elements to display the entire plugin, the caption container, the caption text, the preview container, preview image, and preview status.
- For text file previews, autowrap the text to the thumbnail width, and show a wrap indicator link to display complete text on hover. You can customize the wrap indicator (which defaults to …).
- Customise the messages for preview, progress, and files selected.
- Upload action defaults to form submit. Supports an upload route/server action parameter for custom ajax based upload.
- Triggers JQuery events for advanced development. Events currently available are
filereset
andfileclear
. - Disabled and readonly file input support.
- Size of the entire plugin is less than 11KB (about 9KB for the minified JS and 2KB for the minified CSS).