mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -2,7 +2,6 @@ package com.jsowell.common.util.file;
|
||||
|
||||
import com.jsowell.common.config.JsowellConfig;
|
||||
import com.jsowell.common.config.MinioConfig;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.exception.file.FileNameLengthLimitExceededException;
|
||||
import com.jsowell.common.exception.file.FileSizeLimitExceededException;
|
||||
import com.jsowell.common.exception.file.InvalidExtensionException;
|
||||
@@ -166,7 +165,7 @@ public class FileUploadUtils {
|
||||
public static final String extractFilename(MultipartFile file) {
|
||||
// return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(), FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file));
|
||||
// return StringUtils.format("{}/{}.{}", DateUtils.datePath(), FilenameUtils.getBaseName(file.getOriginalFilename()), getExtension(file));
|
||||
return StringUtils.format("/{}.{}", FilenameUtils.getBaseName(file.getOriginalFilename()), getExtension(file));
|
||||
return StringUtils.format("{}.{}", FilenameUtils.getBaseName(file.getOriginalFilename()), getExtension(file));
|
||||
}
|
||||
|
||||
public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
|
||||
@@ -183,7 +182,8 @@ public class FileUploadUtils {
|
||||
public static final String getPathFileName(String uploadDir, String fileName) throws IOException {
|
||||
int dirLastIndex = JsowellConfig.getProfile().length() + 1;
|
||||
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
|
||||
return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
|
||||
// return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
|
||||
return "/" + currentDir + "/" + fileName;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user