|
@@ -63,16 +63,12 @@ public class BasicSchoolServiceImpl extends ServiceImpl<BasicSchoolMapper, Basic
|
|
|
File fileTemp = null;
|
|
|
String dirName = null;
|
|
|
try {
|
|
|
- fileTemp = File.createTempFile("temp", SystemConstant.JPG_PREFIX);
|
|
|
+ fileTemp = SystemConstant.getFileTempVar(SystemConstant.JPG_PREFIX);
|
|
|
FileUtils.copyInputStreamToFile(logo.getInputStream(), fileTemp);
|
|
|
|
|
|
dirName = stringJoiner + SystemConstant.getNanoId() + "." + FilenameUtils.getExtension(fileTemp.getPath());
|
|
|
String jpgFileMd5 = DigestUtils.md5Hex(new FileInputStream(fileTemp));
|
|
|
if (!oss && Objects.nonNull(dictionaryConfig.fssPublicDomain()) && !StringUtils.isBlank(dictionaryConfig.fssPublicDomain().getServer())) {
|
|
|
-// File file = new File(dirName);
|
|
|
-// if(!file.exists()){
|
|
|
-// file.getParentFile().mkdirs();
|
|
|
-// }
|
|
|
String toBase64 = Base64Util.imageToBase64(fileTemp);
|
|
|
basicSchool.setLogo(toBase64);
|
|
|
} else {
|