|
@@ -103,6 +103,10 @@ public class OSSService {
|
|
|
|
|
|
ByteArrayInputStream inputStream = new ByteArrayInputStream(IoUtil.readBytes(file.getInputStream()));
|
|
|
String fileUrl = dir + file.getOriginalFilename();
|
|
|
+
|
|
|
+ if (FileMagic.valueOf(file.getInputStream()) == FileMagic.OOXML && Objects.requireNonNull(file.getOriginalFilename()).endsWith(".doc")){
|
|
|
+ fileUrl += "x";
|
|
|
+ }
|
|
|
ossClient.putObject(bucket, fileUrl , inputStream);
|
|
|
inputStream.reset();
|
|
|
|