mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-30 13:31:56 +08:00
删除多余的依赖
This commit is contained in:
@@ -29,12 +29,11 @@ public class FastDfsSysFileServiceImpl implements ISysFileService
|
||||
* FastDfs文件上传接口
|
||||
*
|
||||
* @param file 上传的文件
|
||||
* @param baseDir 相对应用的基目录
|
||||
* @return 访问地址
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public String uploadFile(MultipartFile file, String baseDir) throws Exception
|
||||
public String uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
StorePath storePath = storageClient.uploadFile(file.getInputStream(), file.getSize(),
|
||||
FilenameUtils.getExtension(file.getOriginalFilename()), null);
|
||||
|
||||
@@ -13,9 +13,8 @@ public interface ISysFileService
|
||||
* 文件上传接口
|
||||
*
|
||||
* @param file 上传的文件
|
||||
* @param baseDir 相对应用的基目录
|
||||
* @return 访问地址
|
||||
* @throws Exception
|
||||
*/
|
||||
public String uploadFile(MultipartFile file, String baseDir) throws Exception;
|
||||
public String uploadFile(MultipartFile file) throws Exception;
|
||||
}
|
||||
|
||||
@@ -26,6 +26,12 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
||||
*/
|
||||
@Value("${file.domain}")
|
||||
public String domain;
|
||||
|
||||
/**
|
||||
* 上传文件存储在本地的根路径
|
||||
*/
|
||||
@Value("${file.path}")
|
||||
private String localFilePath;
|
||||
|
||||
/**
|
||||
* 本地文件上传接口
|
||||
@@ -35,9 +41,9 @@ public class LocalSysFileServiceImpl implements ISysFileService
|
||||
* @return 访问地址
|
||||
* @throws Exception
|
||||
*/
|
||||
public String uploadFile(MultipartFile file, String baseDir) throws Exception
|
||||
public String uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
String name = FileUploadUtils.upload(baseDir, file);
|
||||
String name = FileUploadUtils.upload(localFilePath, file);
|
||||
String url = domain + localFilePrefix + name;
|
||||
return url;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user