Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
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
吴学德
gdtel-gztel-school-center
Commits
0044d2cc
Commit
0044d2cc
authored
Feb 23, 2021
by
罗承锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整图片路径
parent
d3eb14c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
common/src/main/java/com/winsun/utils/PicturesUtil.java
+3
-7
No files found.
common/src/main/java/com/winsun/utils/PicturesUtil.java
View file @
0044d2cc
...
...
@@ -20,7 +20,7 @@ import java.util.Date;
public
class
PicturesUtil
{
/**
* 上传路径
*
服务器
上传路径
*/
private
static
String
UPLOAD_PRE
=
"/springboot/school_center/manager/"
;
...
...
@@ -63,10 +63,6 @@ public class PicturesUtil {
filePath
=
UPLOAD_PRE
+
FilePath
.
PATH
.
getValue
()+
pathType
+
"/"
+
yymmdd
+
"/"
+
orderNum
+
"/"
+
(
new
Date
()).
getTime
()
+
"."
+
PicturesUtil
.
checkSuffix
(
houzhui
);
//byte[] bytes = Base64.getUrlDecoder().decode(base64Data);
//byte[] bytes =new BASE64Decoder().decodeBuffer(base64Data);
//byte[] bytes = Base64.getDecoder().decode(base64Data);
byte
[]
bytes
=
Base64
.
getMimeDecoder
().
decode
(
base64Data
.
replace
(
" "
,
"+"
));
FileOutputStream
fos
=
null
;
try
{
...
...
@@ -91,7 +87,7 @@ public class PicturesUtil {
}
String
enclosure
=
""
;
if
(
filePath
!=
null
)
{
enclosure
=
filePath
.
replace
(
"enclosure"
,
"manager/ciop"
);
enclosure
=
filePath
.
replace
(
UPLOAD_PRE
+
"enclosure"
,
"manager/ciop"
);
}
return
enclosure
;
...
...
@@ -118,7 +114,7 @@ public class PicturesUtil {
* @return
*/
public
static
boolean
deletePictures
(
String
fileName
){
File
file
=
new
File
(
fileName
.
replace
(
"manager/ciop"
,
"enclosure"
));
File
file
=
new
File
(
fileName
.
replace
(
"manager/ciop"
,
UPLOAD_PRE
+
"enclosure"
));
Boolean
flag
=
false
;
//判断文件是否存在
if
(
file
.
exists
()
==
true
){
...
...
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