mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-18 23:23:46 +08:00
优化:重构代码
This commit is contained in:
@@ -59,7 +59,7 @@ public class FileController {
|
||||
if (!outFile.exists()) {
|
||||
outFile.mkdirs();
|
||||
}
|
||||
logger.info("上传文件:{}", outFile.getAbsolutePath());
|
||||
logger.info("上传文件:{}", fileDir + demoPath + fileName);
|
||||
try(InputStream in = file.getInputStream(); OutputStream out = new FileOutputStream(fileDir + demoPath + fileName)) {
|
||||
StreamUtils.copy(in, out);
|
||||
return new ObjectMapper().writeValueAsString(new ReturnResponse<String>(0, "SUCCESS", null));
|
||||
|
||||
Reference in New Issue
Block a user