I am upload the image in file upload control on change event then image is automatically rotate see in preview tag in my asp.net mvc c#.but i am upload the existing image upload it's good but i am click the image in iphone then image are upload that time image is rotate.this below code are used for the preview image..

This is my file Upload controll

 <img id="PreviewImage" class="mb20" width="300" src="../@Url.Content(@Url.Content(Model.ProfileImage))" />                                        
  @Html.TextBoxFor(model => model.UserFileUpload, new { type = "file", onchange = "ShowVehicleImagePreview(this)" })

this is my funcation

function ShowVehicleImagePreview(input) {
    if (input.files && input.files[0]) {
        var readervehicle = new FileReader();
        readervehicle.onload = function (e) {
            $('#PreviewImage').prop('src', e.target.result).width(300);
        };
        readervehicle.readAsDataURL(input.files[0]);
    }
}

any one have the idea about this issue then please tell me..

Related posts

Recent Viewed