|
@@ -386,7 +386,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
}
|
|
|
|
|
|
|
|
|
- @Value(value = "${upload.file}")
|
|
|
+ @Value(value = "${upload.path}")
|
|
|
private String filePath;
|
|
|
|
|
|
@Override
|
|
@@ -414,7 +414,7 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
long size = file.getSize();
|
|
|
double v = (double) size / (1024 * 1024);
|
|
|
String format = String.format("%.2f MB", v);
|
|
|
- uf.setPath("/file/" + realName);
|
|
|
+ uf.setPath(filePath + realName);
|
|
|
uf.setCode("custom");
|
|
|
System.out.println(format);
|
|
|
uf.setSize(format);
|
|
@@ -469,7 +469,6 @@ public class CustomServiceImpl extends ServiceImpl<CustomMapper, Custom> impleme
|
|
|
// 读取文件的字节流
|
|
|
os.write(FileUtil.readFileByBytes(uploadFile1));
|
|
|
os.flush();
|
|
|
-
|
|
|
} catch (IOException e) {
|
|
|
msg.setError(MessageUtils.message("file.error"));
|
|
|
e.printStackTrace();
|