From 862544669d4e94eb966a8f09317cf2abc2571207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E4=BC=9F?= <421281095@qq.com> Date: Fri, 8 Aug 2025 14:21:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AA=92=E4=BD=93=E5=BA=93=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs index 401e7f1..a36a608 100644 --- a/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs +++ b/OpenAuth.App/ServiceApp/Subscribe/ConfigSubscribe.cs @@ -125,15 +125,15 @@ public class ConfigSubscribe : IJob result = 0, output = new { - bucket = "test", - endpoint = "http://175.27.168.120:6013", + bucket = _minioService._bucketName, + endpoint = $"http://{_minioService.endPoint}", object_key_prefix = Guid.NewGuid().ToString(), // todo 是否设计任务id ? provider = "minio", region = "linyi", credentials = new { - access_key_id = "minioadmin", - access_key_secret = "minioadmin", + access_key_id = $"{_minioService.AccessKey}", + access_key_secret = $"{_minioService.SecretKey}", expire = 3600, security_token = "" } @@ -269,7 +269,7 @@ public class ConfigSubscribe : IJob .Where(a => a.ObjectKey.Equals(objectKey)).SingleAsync(); if (mediaFile == null) { - string suoluokey = "minipic/" + data.file.name.ToString(); + string suoluokey = ""; long? picSize = 0; int width = 0, height = 0, focalLength = 0; int offset = 0, length = 0; @@ -279,6 +279,7 @@ public class ConfigSubscribe : IJob var fileUrl ="http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + objectKey; using (var httpClient = new HttpClient()) { + suoluokey = "minipic/" + data.file.name.ToString(); // 目前读取64KB // 添加Range请求头 httpClient.DefaultRequestHeaders.Range =