It is not entirely clear what you are looking for, but I think it is something like this ...
<script src="/path/to/js/plugins/sortable.min.js"></script>
<script src="/path/to/js/plugins/purify.min.js"></script>
<script src="/path/to/js/fileinput.js"></script>
<script>
$("#userfiles").fileinput({
'dropZoneEnabled': true,
'maxFileCount': totalcount,
'showUpload': false,
'browseLabel': "Click Here or Drag & Drop Images Here",
'browseIcon': "<i class=\"glyphicon glyphicon-picture\"></i> ",
'validateInitialCount': true,
'allowedFileExtensions': ["jpg", "png", "gif", "jpeg"],
'showCaption': true,
'showPreview': true,
'showRemove': true,
uploadUrl: "/file-upload-batch/1",
uploadAsync: false,
minFileCount: 2,
maxFileCount: 5,
overwriteInitial: false,
initialPreviewAsData: true,
initialPreviewFileType: 'image'
}).on('filesorted', function(e, params) {
console.log('File sorted params', params);
}).on('fileuploaded', function(e, params) {
console.log('File uploaded params', params);
});
</script>
source
share