mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-09 13:59:05 +00:00
ref 局部微调
This commit is contained in:
@@ -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);
|
||||
// 获取响应输出流
|
||||
|
Reference in New Issue
Block a user