|
|
@@ -4,9 +4,10 @@ import java.io.File;
|
|
|
import java.io.IOException;
|
|
|
import java.nio.file.Paths;
|
|
|
import java.util.Objects;
|
|
|
+
|
|
|
+import cn.oleauto.common.config.AppConfig;
|
|
|
import org.apache.commons.io.FilenameUtils;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
-import cn.oleauto.common.config.AgvcConfig;
|
|
|
import cn.oleauto.common.constant.Constants;
|
|
|
import cn.oleauto.common.exception.file.FileNameLengthLimitExceededException;
|
|
|
import cn.oleauto.common.exception.file.FileSizeLimitExceededException;
|
|
|
@@ -36,7 +37,7 @@ public class FileUploadUtils
|
|
|
/**
|
|
|
* 默认上传的地址
|
|
|
*/
|
|
|
- private static String defaultBaseDir = AgvcConfig.getProfile();
|
|
|
+ private static String defaultBaseDir = AppConfig.getProfile();
|
|
|
|
|
|
public static void setDefaultBaseDir(String defaultBaseDir)
|
|
|
{
|
|
|
@@ -170,7 +171,7 @@ public class FileUploadUtils
|
|
|
|
|
|
public static final String getPathFileName(String uploadDir, String fileName) throws IOException
|
|
|
{
|
|
|
- int dirLastIndex = AgvcConfig.getProfile().length() + 1;
|
|
|
+ int dirLastIndex = AppConfig.getProfile().length() + 1;
|
|
|
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
|
|
|
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
|
|
|
}
|