|
@@ -55,6 +55,21 @@ public class OSSService {
|
|
return "https://cxzx.smcic.net/" + fileUrl;
|
|
return "https://cxzx.smcic.net/" + fileUrl;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @SneakyThrows
|
|
|
|
+ public String vcrPut(MultipartFile file) {
|
|
|
|
+ String date = new DateTime().toString("yyyyMMdd");
|
|
|
|
+ String time = new DateTime().toString("HHmmss");
|
|
|
|
+ String dir = "operate/vcr/" + date;
|
|
|
|
+// String extName = FileNameUtil.extName(file.getOriginalFilename());
|
|
|
|
+
|
|
|
|
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(IoUtil.readBytes(file.getInputStream()));
|
|
|
|
+ String fileUrl = dir+"/" + time + file.getOriginalFilename();
|
|
|
|
+ ossClient.putObject(bucket, fileUrl , inputStream);
|
|
|
|
+ inputStream.reset();
|
|
|
|
+
|
|
|
|
+ return "https://cxzx.smcic.net/" + fileUrl;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|