|
|
|
@ -2527,11 +2527,13 @@ namespace Myshipping.Application
|
|
|
|
|
var fileFullName = Path.Combine(fileFullPath, fn);
|
|
|
|
|
if (File.Exists(fileFullName))
|
|
|
|
|
{
|
|
|
|
|
_logger.LogDebug($"预览pdf文件:{fileFullName}");
|
|
|
|
|
var readMem = new ReadOnlyMemory<byte>(File.ReadAllBytes(fileFullName));
|
|
|
|
|
_httpContextAccessor.HttpContext.Response.BodyWriter.WriteAsync(readMem);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_logger.LogDebug($"未找到预览pdf文件:{fileFullName}");
|
|
|
|
|
_httpContextAccessor.HttpContext.Response.StatusCode = 404;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|