05d3b9f4 by chentao

no message

1 parent e73fd642
......@@ -140,6 +140,7 @@ public class CourseController extends BaseController {
byte[] fileBytes = null;
try {
InputStream inputStream = storage.getObjectContent(sysOss.getUrl());
log.info("======inputStream===="+inputStream.available());
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[8192]; // 或者根据实际情况选择合适的缓冲区大小
int bytesRead;
......@@ -148,6 +149,7 @@ public class CourseController extends BaseController {
}
byteArrayOutputStream.flush();
fileBytes = byteArrayOutputStream.toByteArray();
log.info("======fileBytes.length===="+fileBytes.length);
byte[] encryptBytes = EncryptUtils.encryptByAes(fileBytes);
uploadResult = storage.uploadSuffix(encryptBytes, suffix, "text/plain");
} catch (Exception e) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!