|
|
@@ -4,6 +4,7 @@ import com.railway.common.constant.Constants;
|
|
|
import com.railway.common.core.domain.AjaxResult;
|
|
|
import com.railway.common.utils.StringUtils;
|
|
|
import com.railway.common.utils.file.FileUploadUtils;
|
|
|
+import com.railway.common.utils.file.FileUtils;
|
|
|
import com.railway.system.service.ISysFileService;
|
|
|
import java.io.File;
|
|
|
|
|
|
@@ -30,7 +31,9 @@ public abstract class AbstractFileService implements ISysFileService {
|
|
|
}
|
|
|
try {
|
|
|
String url = uploadFile(FileUploadUtils.upload(localFile));
|
|
|
- return AjaxResult.uploadFile(url, fileName);
|
|
|
+ AjaxResult ajax = AjaxResult.uploadFile(url, fileName);
|
|
|
+ FileUtils.deleteFile(localFilePath);
|
|
|
+ return ajax;
|
|
|
} catch (Exception e) {
|
|
|
return AjaxResult.error(e.getMessage());
|
|
|
}
|