I wanna get Width and height of the Input file image before update. Its better to get in onchange. but i cant get that actual width and height.
this is cshtml code:
here "imgIdentityPicture" is image view box
<div class="col-md-2 col-md-offset-1">
<input type="file" name="IdentityPicture" id="IdentityPicture" />
</div>
this is script on change :
$(function () {
// Save Customer Identity
$('#IdentityPicture').on('change', function (e) {
e.preventDefault();
var form = $(this).parents('form:first');
$('#imgIdentityPicture').attr("src", '/Content/Images/Animation/loading_fast.gif');
form.ajaxSubmit({
success: function (data) {
$('#imgIdentityPicture').attr("src", data.Url);
$('#SettleBeneficiaryIdPicture').val(data.FileName);
},
beforeSubmit: function (arr, $form, options) {
},
error: function () {
alert('error');
}
});
});
});