文件管理系统文件上传处理
This commit is contained in:
parent
d529e57563
commit
4c71857dd8
|
|
@ -136,7 +136,7 @@ public class FileUploadUtils {
|
|||
private static final String getPathFileName(String uploadDir, String fileName) throws IOException {
|
||||
int dirLastIndex = EBTSConfig.getProfile().length() + 1;
|
||||
String currentDir = StringUtils.substring(uploadDir, dirLastIndex);
|
||||
String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName;
|
||||
String pathFileName = "/" + currentDir + "/" + fileName;
|
||||
return pathFileName;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* @Author 18209
|
||||
|
|
@ -154,7 +155,7 @@ public class FtpUtils {
|
|||
* @return
|
||||
*/
|
||||
public static SysFile uploadFtp(SysFile sysFile) {
|
||||
String dir = EBTSConfig.getProfile() + sysFile.getFileAddr().substring(baseDir.length());
|
||||
String dir = EBTSConfig.getProfile() + sysFile.getFileAddr();
|
||||
String ftpdir = "/";
|
||||
if (sysFile.getIsPublic().equals("1")) {
|
||||
ftpdir += pubfiles;
|
||||
|
|
@ -330,7 +331,7 @@ public class FtpUtils {
|
|||
}
|
||||
|
||||
public static final String getExtension(String fileName) {
|
||||
return FilenameUtils.getExtension(fileName);
|
||||
return FilenameUtils.getExtension(fileName.toLowerCase());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue