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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 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,7 +30,10 @@ public interface Process {
...
@@ -30,7 +30,10 @@ public interface Process {
LOGGER
.
error
(
""
,
e
);
LOGGER
.
error
(
""
,
e
);
}
}
fileName
=
StringUtil
.
subFileName
(
fileName
);
fileName
=
StringUtil
.
subFileName
(
fileName
);
return
"video/"
+
yyyyMMdd
+
"/12401/"
+
fileName
;
if
(
fileName
.
endsWith
(
".mp4"
)
||
fileName
.
endsWith
(
"avi"
)){
return
"video/"
+
yyyyMMdd
+
"/12401/"
+
fileName
;
}
return
"image/"
+
yyyyMMdd
+
"/12401/event/"
+
fileName
;
}
}
static
byte
[]
downloadFile
(
String
url
)
{
static
byte
[]
downloadFile
(
String
url
)
{
...
...
src/main/java/com/viontech/utils/StringUtil.java
View file @
33885f4
...
@@ -12,6 +12,9 @@ public class StringUtil {
...
@@ -12,6 +12,9 @@ public class StringUtil {
* @param filename -
* @param filename -
*/
*/
public
static
String
subFileName
(
String
filename
){
public
static
String
subFileName
(
String
filename
){
if
(
filename
==
null
){
return
""
;
}
int
i
=
filename
.
lastIndexOf
(
"/"
);
int
i
=
filename
.
lastIndexOf
(
"/"
);
filename
=
StringUtils
.
substring
(
filename
,
i
+
1
,
filename
.
length
());
filename
=
StringUtils
.
substring
(
filename
,
i
+
1
,
filename
.
length
());
return
filename
;
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