Далее сделал бы так создал локэйшен в сервере
src="data:image;base64,@System.Convert.ToBase64String(Model.User.Avatar)"
UserEntity current = await _userRepository.Entities
.Include(user => user.Permission)
.Include(user => user.Avatar)
.FirstOrDefaultAsync(user => user.Id == _currentUserContext.UserId);
$.ajax({
url: '@Url.Action("UploadProfileImage", "Account")',
method: 'post',
data: formData,
contentType: 'multipart/form-data',
processData: false,
success: (response) => {
alert("Success");
console.log(response);
},
error: (response) => {
alert("Error");
console.log(response);
}
})
$.ajax({
url: '@Url.Action("UploadProfileImage", "Account")',
method: 'post',
data: formData,
contentType: false,
processData: false,
success: (response) => {
alert("Success");
console.log(response);
},
error: (response) => {
alert("Error");
console.log(response);
}
})