From f2f61fdb9a81fba256b1bd05330fbbac2633149a Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 27 八月 2024 16:38:33 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/cylsg
---
cylsg/EzUpFile/EzFileUploadService.cs | 39 ++++++++++++++++++++++++++++++++++++++-
1 files changed, 38 insertions(+), 1 deletions(-)
diff --git a/cylsg/EzUpFile/EzFileUploadService.cs b/cylsg/EzUpFile/EzFileUploadService.cs
index e877b52..da61bfd 100644
--- a/cylsg/EzUpFile/EzFileUploadService.cs
+++ b/cylsg/EzUpFile/EzFileUploadService.cs
@@ -10,6 +10,8 @@
using Microsoft.AspNetCore.Http;
using SqlSugar;
+using System;
+using System.Buffers.Text;
using System.Drawing;
using System.Globalization;
using System.Security.Policy;
@@ -339,6 +341,7 @@
idcordinfo = _tcs.IdCord(img64, PageName == "FRONT");
url = await UploadFilesFByBase64(_tcs.GetIdCordImg());
+ idcordinfo.AdvancedInfo = null;
return (idcordinfo, url);
@@ -487,8 +490,42 @@
throw Oops.Oh(e.Message);
}
}
+/// <inheritdoc/>
-
+ public async Task<(bool, string)> IaiAddPerso(string imgBase64, string CoredID, string Name, int PersonGender)
+ {
+ if (string.IsNullOrEmpty(imgBase64))
+ {
+ throw Oops.Oh("娌℃湁鍐呭");
+ }
+
+ //妫�鏌ヤ笂浼犲ぇ灏�
+ if (!CommonHelper.CheckBase64Size(imgBase64, 5))
+ {
+ throw Oops.Oh("涓婁紶鏂囦欢澶у皬瓒呰繃闄愬埗锛屾渶澶у厑璁镐笂浼�" + "5" + "M");
+ }
+
+ imgBase64 = imgBase64.Replace("data:image/png;base64,", "").Replace("data:image/jgp;base64,", "").Replace("data:image/jpg;base64,", "").Replace("data:image/jpeg;base64,", "");//灏哹ase64澶撮儴淇℃伅鏇挎崲
+ bool info = false;
+ string url = "";
+
+ try
+ {
+ info = _tcs.IaiAddPerso(imgBase64, CoredID, Name, PersonGender);
+
+ url = await UploadFilesFByBase64(imgBase64);
+
+ return (info, url);
+
+ }
+ catch (Exception e)
+ {
+
+ throw Oops.Oh(e.Message);
+ }
+ }
+
+
#endregion
}
}
--
Gitblit v1.9.1