Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeoFlyApi
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GeoFly
GeoFlyApi
Commits
8eab34eb
Commit
8eab34eb
authored
Mar 05, 2026
by
guoxuejian
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'prod' of
http://git.raytue.com/GeoFly/GeoFlyApi
into prod
parents
50829767
fa711dee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
sample/src/main/java/com/dji/sample/media/service/impl/MediaServiceImpl.java
+18
-3
No files found.
sample/src/main/java/com/dji/sample/media/service/impl/MediaServiceImpl.java
View file @
8eab34eb
...
@@ -196,7 +196,12 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
...
@@ -196,7 +196,12 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
file
.
setPath
(
path
);
file
.
setPath
(
path
);
file
.
setObjectKey
(
moveFilePath
+
"/"
+
callback
.
getFile
().
getName
());
file
.
setObjectKey
(
moveFilePath
+
"/"
+
callback
.
getFile
().
getName
());
moveFile
(
orgFilePath
,
moveFilePath
,
callback
.
getFile
().
getName
());
try
{
moveFile
(
orgFilePath
,
moveFilePath
,
callback
.
getFile
().
getName
());
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to move file for temporary task: {}"
,
e
.
getMessage
());
// 继续执行,不中断流程
}
}
else
{
}
else
{
// 查询 任务的orgId
// 查询 任务的orgId
String
orgId
=
""
;
String
orgId
=
""
;
...
@@ -227,7 +232,12 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
...
@@ -227,7 +232,12 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
file
.
setPath
(
path
);
file
.
setPath
(
path
);
file
.
setObjectKey
(
moveFilePath
+
"/"
+
callback
.
getFile
().
getName
());
file
.
setObjectKey
(
moveFilePath
+
"/"
+
callback
.
getFile
().
getName
());
moveFile
(
orgFilePath
,
moveFilePath
,
callback
.
getFile
().
getName
());
try
{
moveFile
(
orgFilePath
,
moveFilePath
,
callback
.
getFile
().
getName
());
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to move file for wayline job: {}"
,
e
.
getMessage
());
// 继续执行,不中断流程
}
}
else
{
}
else
{
file
.
setPath
(
path
);
file
.
setPath
(
path
);
}
}
...
@@ -243,12 +253,17 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
...
@@ -243,12 +253,17 @@ public class MediaServiceImpl extends AbstractMediaService implements IMediaServ
boolean
created
=
directory
.
mkdirs
();
boolean
created
=
directory
.
mkdirs
();
}
}
Path
source
=
Paths
.
get
(
basePath
,
OssConfiguration
.
bucket
,
sourceFilePath
,
fileName
);
Path
source
=
Paths
.
get
(
basePath
,
OssConfiguration
.
bucket
,
sourceFilePath
,
fileName
);
// 检查源文件是否存在
if
(!
Files
.
exists
(
source
))
{
log
.
warn
(
"Source file does not exist: {}"
,
source
);
return
;
// 源文件不存在时直接返回,不抛出异常
}
Path
targetDir
=
Paths
.
get
(
basePath
,
OssConfiguration
.
bucket
,
targetFilePath
);
Path
targetDir
=
Paths
.
get
(
basePath
,
OssConfiguration
.
bucket
,
targetFilePath
);
if
(!
Files
.
exists
(
targetDir
))
{
if
(!
Files
.
exists
(
targetDir
))
{
Files
.
createDirectories
(
targetDir
);
Files
.
createDirectories
(
targetDir
);
}
}
Path
target
=
targetDir
.
resolve
(
fileName
);
Path
target
=
targetDir
.
resolve
(
fileName
);
Files
.
move
(
source
,
target
,
StandardCopyOption
.
REPLACE_EXISTING
);
Files
.
copy
(
source
,
target
,
StandardCopyOption
.
REPLACE_EXISTING
);
}
}
private
void
notifyUploadedCount
(
MediaFileCountDTO
mediaFileCount
,
TopicEventsRequest
<
FileUploadCallback
>
request
,
String
jobId
,
DeviceDTO
dock
)
{
private
void
notifyUploadedCount
(
MediaFileCountDTO
mediaFileCount
,
TopicEventsRequest
<
FileUploadCallback
>
request
,
String
jobId
,
DeviceDTO
dock
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment