疯狂的狮子li
2021-07-06 80e74eb91c08fc1d774d1274323546d5ce592455
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
@@ -1,5 +1,6 @@
package com.ruoyi.common.utils.file;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
@@ -113,7 +114,8 @@
        String fileName = extractFilename(file);
        File desc = getAbsoluteFile(baseDir, fileName);
        file.transferTo(desc);
      desc = FileUtil.touch(desc);
      FileUtil.writeFromStream(file.getInputStream(), desc);
        String pathFileName = getPathFileName(baseDir, fileName);
        return pathFileName;
    }