| | |
| | | import org.springframework.context.annotation.Primary;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import com.ruoyi.common.core.utils.StringUtils;
|
| | | import com.ruoyi.common.core.utils.file.FileUtils;
|
| | | import com.ruoyi.file.utils.FileUploadUtils;
|
| | |
|
| | | /**
|
| | |
| | | String url = domain + localFilePrefix + name;
|
| | | return url;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 本地文件删除接口
|
| | | * |
| | | * @param fileUrl 文件访问URL
|
| | | * @throws Exception
|
| | | */
|
| | | @Override
|
| | | public void deleteFile(String fileUrl) throws Exception
|
| | | {
|
| | | String localFile = StringUtils.substringAfter(fileUrl, localFilePrefix);
|
| | | FileUtils.deleteFile(localFilePath + localFile);
|
| | | }
|
| | | }
|