媒体图片记录添加拍摄负载

main
陈伟 1 month ago
parent e86dcb6c3c
commit 9d24c8e261

@ -273,6 +273,7 @@ public class ConfigSubscribe : IJob
long? picSize = 0;
int width = 0, height = 0, focalLength = 0;
int offset = 0, length = 0;
string model = "";
var fileUrl ="http://" + _minioService.endPoint + "/" + _minioService._bucketName + "/" + objectKey;
using (var httpClient = new HttpClient())
{
@ -306,6 +307,16 @@ public class ConfigSubscribe : IJob
{
if (directory is ExifDirectoryBase)
{
if (directory.Name.Equals("Exif IFD0"))
{
foreach (var tag in directory.Tags)
{
if (tag.Name.Equals("Model"))
{
model = tag.Description;
}
}
}
if (directory.Name.Equals("Exif SubIFD"))
{
foreach (var tag in directory.Tags)
@ -432,7 +443,8 @@ public class ConfigSubscribe : IJob
Size = picSize,
ShowOnMap = 1,
display = 1,
FocalLength = focalLength
FocalLength = focalLength,
PayloadModelName = model
};
// todo 添加事务
await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync();

@ -122,6 +122,8 @@ public class LasaMediaFile
public string minipic { get; set; }
public double? FocalLength { get; set; }
public string PayloadModelName { get; set; }
[SugarColumn(IsIgnore = true)] public List<LasaMediaFile> Children { get; set; }

Loading…
Cancel
Save