I am trying to display a pop-up with bootbox.dialog(...)
. Inside this bootbox, I would like to put an input type="file"
and retrieve the file uploaded. How can I get the uploaded file ?
BOOTBOX (inside my AngularJS Controller)
bootbox.dialog({
title: "More information",
message: '<div class="row"> ' +
'<div class="col-md12"> ' +
'<form class="form-horizontal"> ' +
'<div class="form-group">' +
'<label class="col-md-3 control-label" for="logo">Logo</label> ' +
'<div class="col-md-4">' +
'<img id="logo" name="logo" class="customerImg"/>' +
'</div>' +
'<span class="btn btn-default btn-file col-md-3">Browse another logo<input type="file" fileread="customerLogo" />' +
'</div>' +
'</form>' +
'</div>' +
'</div>',
buttons: {
danger: {
label: "Cancel",
className: "btn btn-primary"
},
success: {
label: "Generate word",
className: "btn btn-primary",
callback: function () {
console.log(document.getElementById('logo').val());
}
}
}
});