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
602be216
Commit
602be216
authored
Apr 28, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
7fcc3eef
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
FileUploadController.java
.../chnmuseum/party/web/controller/FileUploadController.java
+2
-0
No files found.
src/main/java/cn/chnmuseum/party/web/controller/FileUploadController.java
View file @
602be216
...
...
@@ -170,6 +170,7 @@ public class FileUploadController extends BaseController {
final
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
IOUtils
.
copy
(
file
.
getInputStream
(),
byteArrayOutputStream
);
fileUrl
=
FastDFSUtils
.
uploadVideo
(
new
ByteArrayInputStream
(
byteArrayOutputStream
.
toByteArray
()),
file
.
getSize
(),
originalFilename
,
metaDataSet
);
metaDataSet
.
removeIf
(
x
->
"MD5"
.
equals
(
x
.
getName
()));
metaDataSet
.
add
(
new
MetaData
(
"fileName"
,
baseName
+
".chnmuseum"
));
fileUrlCrypto
=
FastDFSUtils
.
uploadVideo
(
VideoEncryptUtil
.
encrypt
(
new
ByteArrayInputStream
(
byteArrayOutputStream
.
toByteArray
()),
VideoEncryptUtil
.
cipher
),
file
.
getSize
(),
baseName
+
".chnmuseum"
,
metaDataSet
);
final
Set
<
MetaData
>
fileMetaData
=
FastDFSUtils
.
getFileMetaData
(
fileUrlCrypto
);
...
...
@@ -543,6 +544,7 @@ public class FileUploadController extends BaseController {
final
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
IOUtils
.
copy
(
file
.
getInputStream
(),
byteArrayOutputStream
);
final
String
fileUrl
=
FastDFSUtils
.
uploadVideo
(
new
ByteArrayInputStream
(
byteArrayOutputStream
.
toByteArray
()),
file
.
getSize
(),
originalFilename
,
metaDataSet
);
metaDataSet
.
removeIf
(
x
->
"MD5"
.
equals
(
x
.
getName
()));
metaDataSet
.
add
(
new
MetaData
(
"fileName"
,
baseName
+
".chnmuseum"
));
final
String
fileUrlCrypto
=
FastDFSUtils
.
uploadVideo
(
VideoEncryptUtil
.
encrypt
(
new
ByteArrayInputStream
(
byteArrayOutputStream
.
toByteArray
()),
VideoEncryptUtil
.
cipher
),
file
.
getSize
(),
baseName
+
".chnmuseum"
,
metaDataSet
);
final
Set
<
MetaData
>
fileMetaData
=
FastDFSUtils
.
getFileMetaData
(
fileUrlCrypto
);
...
...
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