mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-27 20:21:56 +08:00
优化代码
This commit is contained in:
@@ -4,10 +4,9 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.ruoyi.common.core.exception.file.FileException;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.ruoyi.common.core.exception.file.FileException;
|
||||
import com.ruoyi.common.core.exception.file.FileNameLengthLimitExceededException;
|
||||
import com.ruoyi.common.core.exception.file.FileSizeLimitExceededException;
|
||||
import com.ruoyi.common.core.exception.file.InvalidExtensionException;
|
||||
@@ -48,7 +47,8 @@ public class FileUploadUtils
|
||||
{
|
||||
return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
|
||||
}
|
||||
catch (FileException fe){
|
||||
catch (FileException fe)
|
||||
{
|
||||
throw new IOException(fe.getDefaultMessage(), fe);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
Reference in New Issue
Block a user