This is the uploaded form.
Using Bootstrap
Remove form-control-file Class from input field to avoid unwanted horizontal scroll bar
Try this!!
$('#upload').change(function() {
var filename = $('#upload').val();
if (filename.substring(3,11) == 'fakepath') {
filename = filename.substring(12);
} // For Remove fakepath
$("label[for='file_name'] b").html(filename);
$("label[for='file_default']").text('Selected File: ');
if (filename == "") {
$("label[for='file_default']").text('No File Choosen');
}
});
.custom_file {
margin: auto;
opacity: 0;
position: absolute;
z-index: -1;
}