ref 局部微调

This commit is contained in:
DaxPay
2024-05-13 20:40:47 +08:00
parent e9e44deb42
commit 407862d426
12 changed files with 763 additions and 75 deletions

View File

@@ -94,6 +94,10 @@ public class FileUploadService {
@SneakyThrows
public void preview(Long id, HttpServletResponse response) {
FileInfo info = fileStorageService.getFileInfoByUrl(String.valueOf(id));
if (info == null){
log.warn("文件不存在");
return;
}
byte[] bytes = fileStorageService.download(info).bytes();
val is = new ByteArrayInputStream(bytes);
// 获取响应输出流