Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
谢明辉
/
recv_data_longhua
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 39266651
authored
Sep 25, 2020
by
zhangxk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改ftp文件上传目录
增加视频接收接口日志打印
1 parent
b576e301
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
src/main/java/com/viontech/controller/DataController.java
src/main/java/com/viontech/process/Process.java
src/main/java/com/viontech/controller/DataController.java
View file @
3926665
...
@@ -39,6 +39,8 @@ public class DataController {
...
@@ -39,6 +39,8 @@ public class DataController {
@PostMapping
(
"/video"
)
@PostMapping
(
"/video"
)
public
Object
receiveVideo
(
@RequestParam
(
name
=
"file"
)
MultipartFile
file
,
MultipartHttpServletRequest
request
)
throws
IOException
{
public
Object
receiveVideo
(
@RequestParam
(
name
=
"file"
)
MultipartFile
file
,
MultipartHttpServletRequest
request
)
throws
IOException
{
log
.
info
(
"接收到视频文件"
);
log
.
warn
(
"接收到视频文件"
);
String
refid
=
request
.
getParameter
(
"refid"
);
String
refid
=
request
.
getParameter
(
"refid"
);
VideoUtil
.
addVideo
(
refid
,
file
.
getBytes
());
VideoUtil
.
addVideo
(
refid
,
file
.
getBytes
());
return
"success"
;
return
"success"
;
...
...
src/main/java/com/viontech/process/Process.java
View file @
3926665
...
@@ -27,7 +27,7 @@ public interface Process {
...
@@ -27,7 +27,7 @@ public interface Process {
ip
=
"null"
;
ip
=
"null"
;
LOGGER
.
error
(
""
,
e
);
LOGGER
.
error
(
""
,
e
);
}
}
return
"
12401/video/"
+
yyyyMMdd
+
"/"
+
ip
+
"/"
+
deviceId
+
"
/"
+
fileName
;
return
"
video/"
+
yyyyMMdd
+
"/12401
/"
+
fileName
;
}
}
static
byte
[]
downloadFile
(
String
url
)
{
static
byte
[]
downloadFile
(
String
url
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment