bugfix: 指令拍照媒体图片关系不到正确的文件夹
parent
aeb12f6ad1
commit
38a1cddc29
|
|
@ -242,6 +242,11 @@ public class ConfigSubscribe : IJob
|
|||
string objectKey = data.file.object_key;
|
||||
var folderKey = ((string)data.file.object_key).Split("/");
|
||||
var parentKey = folderKey[2];
|
||||
if (flightType.Equals(1))
|
||||
{
|
||||
parentKey = flightId;
|
||||
}
|
||||
|
||||
var isExist = await _sqlSugarClient
|
||||
.Queryable<LasaMediaFile>()
|
||||
.Where(x => x.Id.Equals(parentKey)).CountAsync();
|
||||
|
|
@ -298,7 +303,7 @@ public class ConfigSubscribe : IJob
|
|||
int width = 0, height = 0, focalLength = 0;
|
||||
int offset = 0, length = 0;
|
||||
string model = "";
|
||||
float? gimbalRoll= 0, gimbalPitch=0;
|
||||
float? gimbalRoll = 0, gimbalPitch = 0;
|
||||
float? digitalZoomRatio = 1;
|
||||
var fileUrl = "http://" + _minioService.endPoint + "/" + _minioService._bucketName +
|
||||
"/" + objectKey;
|
||||
|
|
@ -355,7 +360,6 @@ public class ConfigSubscribe : IJob
|
|||
{
|
||||
if (directory is ExifDirectoryBase)
|
||||
{
|
||||
|
||||
if (directory.Name.Equals("Exif IFD0"))
|
||||
{
|
||||
foreach (var tag in directory.Tags)
|
||||
|
|
@ -376,6 +380,7 @@ public class ConfigSubscribe : IJob
|
|||
{
|
||||
digitalZoomRatio = float.Parse(tag.Description);
|
||||
}
|
||||
|
||||
if (tag.Name.Equals("Exif Image Width"))
|
||||
{
|
||||
width = int.Parse(tag.Description.Replace("pixels", "")
|
||||
|
|
@ -466,7 +471,7 @@ public class ConfigSubscribe : IJob
|
|||
Path = data.file.path, // 目前这个好像没有值
|
||||
CreateTime = createTime,
|
||||
WorkspaceId = workspaceId,
|
||||
ParentKey = folderKey[2],
|
||||
ParentKey = parentKey,
|
||||
Tid = result.tid,
|
||||
Bid = result.bid,
|
||||
FlightType = flightType,
|
||||
|
|
|
|||
Loading…
Reference in New Issue