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 33885f4f
authored
Sep 27, 2020
by
zhangxk
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改ftp文件上传路径,图片和视频路径分开放
1 parent
fc88bf28
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
src/main/java/com/viontech/process/Process.java
src/main/java/com/viontech/utils/StringUtil.java
src/main/java/com/viontech/process/Process.java
View file @
33885f4
...
...
@@ -30,8 +30,11 @@ public interface Process {
LOGGER
.
error
(
""
,
e
);
}
fileName
=
StringUtil
.
subFileName
(
fileName
);
if
(
fileName
.
endsWith
(
".mp4"
)
||
fileName
.
endsWith
(
"avi"
)){
return
"video/"
+
yyyyMMdd
+
"/12401/"
+
fileName
;
}
return
"image/"
+
yyyyMMdd
+
"/12401/event/"
+
fileName
;
}
static
byte
[]
downloadFile
(
String
url
)
{
...
...
src/main/java/com/viontech/utils/StringUtil.java
View file @
33885f4
...
...
@@ -12,6 +12,9 @@ public class StringUtil {
* @param filename -
*/
public
static
String
subFileName
(
String
filename
){
if
(
filename
==
null
){
return
""
;
}
int
i
=
filename
.
lastIndexOf
(
"/"
);
filename
=
StringUtils
.
substring
(
filename
,
i
+
1
,
filename
.
length
());
return
filename
;
...
...
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