Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
ceb089aa
Commit
ceb089aa
authored
Nov 21, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改同步事项
parent
23bd2f62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
portal-manager/src/main/java/com/mortals/xhx/module/uploadfile/web/UploadfileController.java
...rtals/xhx/module/uploadfile/web/UploadfileController.java
+4
-4
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/uploadfile/web/UploadfileController.java
View file @
ceb089aa
...
@@ -107,12 +107,12 @@ public class UploadfileController extends BaseCRUDJsonBodyMappingController<Uplo
...
@@ -107,12 +107,12 @@ public class UploadfileController extends BaseCRUDJsonBodyMappingController<Uplo
if
(
file
.
exists
())
{
if
(
file
.
exists
())
{
try
{
try
{
//zip.putNextEntry(new ZipEntry(StrUtil.subAfter(filePath, "/", false)));
//zip.putNextEntry(new ZipEntry(StrUtil.subAfter(filePath, "/", false)));
zip
.
putNextEntry
(
new
ZipEntry
(
filePath
));
zip
.
putNextEntry
(
new
ZipEntry
(
StrUtil
.
removePrefix
(
filePath
,
"/"
)
));
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
zip
.
flush
();
zip
.
flush
();
zip
.
closeEntry
();
zip
.
closeEntry
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"异常"
,
e
.
getMessage
()
);
log
.
error
(
"异常"
,
e
);
}
}
}
}
}
}
...
@@ -124,7 +124,7 @@ public class UploadfileController extends BaseCRUDJsonBodyMappingController<Uplo
...
@@ -124,7 +124,7 @@ public class UploadfileController extends BaseCRUDJsonBodyMappingController<Uplo
File
file
=
new
File
(
filePath
);
File
file
=
new
File
(
filePath
);
if
(
file
.
exists
())
{
if
(
file
.
exists
())
{
try
{
try
{
zip
.
putNextEntry
(
new
ZipEntry
(
filePath
));
zip
.
putNextEntry
(
new
ZipEntry
(
StrUtil
.
removePrefix
(
filePath
,
"/"
)
));
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
zip
.
flush
();
zip
.
flush
();
zip
.
closeEntry
();
zip
.
closeEntry
();
...
@@ -142,7 +142,7 @@ public class UploadfileController extends BaseCRUDJsonBodyMappingController<Uplo
...
@@ -142,7 +142,7 @@ public class UploadfileController extends BaseCRUDJsonBodyMappingController<Uplo
File
file
=
new
File
(
filePath
);
File
file
=
new
File
(
filePath
);
if
(
file
.
exists
())
{
if
(
file
.
exists
())
{
try
{
try
{
zip
.
putNextEntry
(
new
ZipEntry
(
filePath
));
zip
.
putNextEntry
(
new
ZipEntry
(
StrUtil
.
removePrefix
(
filePath
,
"/"
)
));
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
IOUtils
.
write
(
FileUtil
.
readBytes
(
file
),
zip
);
zip
.
flush
();
zip
.
flush
();
zip
.
closeEntry
();
zip
.
closeEntry
();
...
...
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