Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
2d22f90f
Commit
2d22f90f
authored
May 21, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dddddd
parent
d88911e5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
AssetController.java
...va/cn/chnmuseum/party/web/controller/AssetController.java
+2
-2
No files found.
src/main/java/cn/chnmuseum/party/web/controller/AssetController.java
View file @
2d22f90f
...
@@ -112,7 +112,7 @@ public class AssetController extends BaseController {
...
@@ -112,7 +112,7 @@ public class AssetController extends BaseController {
for
(
Asset
asset
:
assetList
)
{
for
(
Asset
asset
:
assetList
)
{
ByteArrayOutputStream
byteOutputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
byteOutputStream
=
new
ByteArrayOutputStream
();
FastDFSUtils
.
downloadFile
(
asset
.
getFileUrlCrypto
(),
byteOutputStream
);
FastDFSUtils
.
downloadFile
(
asset
.
getFileUrlCrypto
(),
byteOutputStream
);
map
.
put
(
asset
.
get
Md5
()
+
".chnmuseum"
,
VideoEncryptUtil
.
encrypt
(
new
ByteArrayInputStream
(
byteOutputStream
.
toByteArray
()),
VideoEncryptUtil
.
cipher
));
map
.
put
(
asset
.
get
FileNameCrypto
(),
new
ByteArrayInputStream
(
byteOutputStream
.
toByteArray
()
));
}
}
String
[]
paths
=
map
.
keySet
().
toArray
(
new
String
[
0
]);
String
[]
paths
=
map
.
keySet
().
toArray
(
new
String
[
0
]);
InputStream
[]
ins
=
map
.
values
().
toArray
(
new
InputStream
[
0
]);
InputStream
[]
ins
=
map
.
values
().
toArray
(
new
InputStream
[
0
]);
...
@@ -136,7 +136,7 @@ public class AssetController extends BaseController {
...
@@ -136,7 +136,7 @@ public class AssetController extends BaseController {
for
(
Asset
asset
:
assetList
)
{
for
(
Asset
asset
:
assetList
)
{
ByteArrayOutputStream
byteOutputStream
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
byteOutputStream
=
new
ByteArrayOutputStream
();
FastDFSUtils
.
downloadFile
(
asset
.
getFileUrlCrypto
(),
byteOutputStream
);
FastDFSUtils
.
downloadFile
(
asset
.
getFileUrlCrypto
(),
byteOutputStream
);
map
.
put
(
asset
.
get
Md5
()
+
".chnmuseum"
,
VideoEncryptUtil
.
encrypt
(
new
ByteArrayInputStream
(
byteOutputStream
.
toByteArray
()),
VideoEncryptUtil
.
cipher
));
map
.
put
(
asset
.
get
FileNameCrypto
(),
new
ByteArrayInputStream
(
byteOutputStream
.
toByteArray
()
));
}
}
ZipUtil
.
zip
(
response
.
getOutputStream
(),
map
.
keySet
().
toArray
(
new
String
[
0
]),
map
.
values
().
toArray
(
new
InputStream
[
0
]));
ZipUtil
.
zip
(
response
.
getOutputStream
(),
map
.
keySet
().
toArray
(
new
String
[
0
]),
map
.
values
().
toArray
(
new
InputStream
[
0
]));
}
}
...
...
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