feat(background): add visual recognition task and refactor picture processing

This commit is contained in:
ShiYu
2025-06-08 15:40:08 +08:00
parent 7ad8b6c826
commit 39c40d2746
17 changed files with 473 additions and 269 deletions

View File

@@ -43,8 +43,10 @@ public class S3StorageProvider(IConfigService configService, ILogger<S3StoragePr
{
// 创建唯一的文件存储路径
string currentDate = DateTime.Now.ToString("yyyy/MM");
string ext = Path.GetExtension(fileName);
string objectKey = $"{currentDate}/{Guid.NewGuid()}{ext}";
// fileName 参数现在是期望的最终文件名部分,例如 "guid.ext"
// string ext = Path.GetExtension(fileName); // 旧的 fileName 是原始文件名,现在 fileName 是目标文件名
// string objectKey = $"{currentDate}/{Guid.NewGuid()}{ext}"; // 旧逻辑
string objectKey = $"{currentDate}/{fileName}"; // 新逻辑
using var client = CreateClient();
using var transferUtility = new TransferUtility(client);