I have this JavaScript code:
$("#uploadFile").fileinput({
uploadUrl: url,
maxFilePreviewSize: 10240,
allowedFileExtensions: ["xls", "xlsx", "csv"],
maxFileCount: 1,
language: 'es',
theme: 'gly',
autoReplace: true,
maxFileSize: 4096,
required: true,
browseOnZoneClick: true
});
$('#uploadFile').on('fileuploaded', function(event, data, previewId, index) {
var form = data.form,
files = data.files,
extra = data.extra,
response = data.response,
reader = data.reader;
DisplayResults(response);
});
bootstrap-fileinput works but it shows no progress while processing. It only shows progress bar fully painted with "Processing..." text in it when file is uploading and changes to "Done" text when POST returns.
I am using this plugin: http://plugins.krajee.com/file-input
How can I set progress bar to show progress percentage? while file is actually being uploaded and while file is being processed?
According to the documentation, you can set the
progress
property in thelayoutTemplates
:regarding the
progress
property:The default is this:
which is why you see 'Processing' and 'Done' only. However, if you replace
{status}
with{percent}
it will render the percentage. Again, as per the documentation:you can also look in to
msgProgress
.Reading Material
Plugin Options