ow
This commit is contained in:
1 parent
282d8ce583
commit
28dd3ffebd
229 files changed
+5765
-4786
No files matched your search
@@ -24,6 +24,28 @@ namespace CloudBuilder.Security.Policy
|
||||
public const string FfmpegPictrue = "Ffmpeg:Pictrue";
|
||||
public const string FfmpegArguments = "Ffmpeg:Arguments";
|
||||
|
||||
// 身份证 OCR 识别服务(server-to-server 调用,地址来自 appsettings.json,避免写死)
|
||||
public const string IdCardOcrApiUrl = "IdCardOcr:ApiUrl";
|
||||
public const string IdCardOcrSide = "IdCardOcr:Side";
|
||||
public const string IdCardOcrTimeoutSeconds = "IdCardOcr:TimeoutSeconds";
|
||||
|
||||
public static string GetIdCardOcrApiUrl(IApplicationService service)
|
||||
{
|
||||
return service.Configuration[IdCardOcrApiUrl];
|
||||
}
|
||||
|
||||
public static string GetIdCardOcrSide(IApplicationService service)
|
||||
{
|
||||
var side = service.Configuration[IdCardOcrSide];
|
||||
return string.IsNullOrWhiteSpace(side) ? "auto" : side;
|
||||
}
|
||||
|
||||
public static int GetIdCardOcrTimeoutSeconds(IApplicationService service)
|
||||
{
|
||||
var raw = service.Configuration[IdCardOcrTimeoutSeconds];
|
||||
return int.TryParse(raw, out var seconds) && seconds > 0 ? seconds : 30;
|
||||
}
|
||||
|
||||
public static string GetPhysicalFileDirectory(IApplicationService service)
|
||||
{
|
||||
return service.Configuration[PhysicalFileDirectory];
|
||||
|
||||
Reference in new issue
Block a user