Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
legobackend
/
lego-manage
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
fb625d54
authored
2025-08-10 15:21:03 +0800
by
chentao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
6ef5a1a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
lego-admin/src/main/java/com/lego/web/controller/core/CourseController.java
lego-admin/src/main/java/com/lego/web/controller/core/CourseController.java
View file @
fb625d5
...
...
@@ -107,7 +107,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
@@ -204,7 +205,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
@@ -301,7 +303,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
@@ -398,7 +401,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
@@ -495,7 +499,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
@@ -592,7 +597,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
@@ -689,7 +695,8 @@ public class CourseController extends BaseController {
UploadResult
uploadResult
=
null
;
if
(
".pdf"
.
equals
(
suffix
))
{
byte
[]
fileBytes
=
null
;
try
(
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
()))
{
try
{
InputStream
inputStream
=
storage
.
getObjectContent
(
sysOss
.
getUrl
());
ByteArrayOutputStream
byteArrayOutputStream
=
new
ByteArrayOutputStream
();
byte
[]
buffer
=
new
byte
[
8192
];
// 或者根据实际情况选择合适的缓冲区大小
int
bytesRead
;
...
...
Write
Preview
Styling with
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