媒体库查询添加字段

main
陈伟 1 month ago
parent 2bb0cf7f0c
commit 862544669d

@ -125,15 +125,15 @@ public class ConfigSubscribe : IJob
result = 0, result = 0,
output = new output = new
{ {
bucket = "test", bucket = _minioService._bucketName,
endpoint = "http://175.27.168.120:6013", endpoint = $"http://{_minioService.endPoint}",
object_key_prefix = Guid.NewGuid().ToString(), // todo 是否设计任务id object_key_prefix = Guid.NewGuid().ToString(), // todo 是否设计任务id
provider = "minio", provider = "minio",
region = "linyi", region = "linyi",
credentials = new credentials = new
{ {
access_key_id = "minioadmin", access_key_id = $"{_minioService.AccessKey}",
access_key_secret = "minioadmin", access_key_secret = $"{_minioService.SecretKey}",
expire = 3600, expire = 3600,
security_token = "" security_token = ""
} }
@ -269,7 +269,7 @@ public class ConfigSubscribe : IJob
.Where(a => a.ObjectKey.Equals(objectKey)).SingleAsync(); .Where(a => a.ObjectKey.Equals(objectKey)).SingleAsync();
if (mediaFile == null) if (mediaFile == null)
{ {
string suoluokey = "minipic/" + data.file.name.ToString(); string suoluokey = "";
long? picSize = 0; long? picSize = 0;
int width = 0, height = 0, focalLength = 0; int width = 0, height = 0, focalLength = 0;
int offset = 0, length = 0; int offset = 0, length = 0;
@ -279,6 +279,7 @@ public class ConfigSubscribe : IJob
var fileUrl ="http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + objectKey; var fileUrl ="http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + objectKey;
using (var httpClient = new HttpClient()) using (var httpClient = new HttpClient())
{ {
suoluokey = "minipic/" + data.file.name.ToString();
// 目前读取64KB // 目前读取64KB
// 添加Range请求头 // 添加Range请求头
httpClient.DefaultRequestHeaders.Range = httpClient.DefaultRequestHeaders.Range =

Loading…
Cancel
Save