20231221获取人员接口 按照图片二进制更新
This commit is contained in:
parent
38aea9bbc5
commit
1f08356eb1
|
@ -266,16 +266,6 @@ namespace WebAPI.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(getPerson.PhotoUrl) && (person.headImage.Length > 0 || !string.IsNullOrEmpty(person.PhotoUrl)))
|
||||
{
|
||||
if (person.headImage.Length == 0 && !string.IsNullOrEmpty(person.PhotoUrl))
|
||||
{
|
||||
var getS = AttachFileService.SetImageToByteArray(person.PhotoUrl);
|
||||
if (getS != null)
|
||||
{
|
||||
person.headImage = getS.ToString();
|
||||
}
|
||||
}
|
||||
if (person.headImage.Length > 0)
|
||||
{
|
||||
var image = Convert.FromBase64String(person.headImage);
|
||||
|
@ -291,7 +281,6 @@ namespace WebAPI.Controllers
|
|||
getPerson.PhotoUrl = path + flieName;
|
||||
System.IO.File.WriteAllBytes((fileUrl + flieName), image);
|
||||
//AttachFileService.Base64ToImage(person.headImage, path, person.PersonName);
|
||||
}
|
||||
db.SubmitChanges();
|
||||
responeData.message = "更新照片!";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue