소스 검색

打印文件路径

limin 7 년 전
부모
커밋
50dd2676d5
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      src/main/java/com/goafanti/common/controller/BaseApiController.java

+ 3 - 1
src/main/java/com/goafanti/common/controller/BaseApiController.java

@@ -263,8 +263,10 @@ public class BaseApiController extends BaseController {
 		String fileName = mf.getName() + System.nanoTime() + ".mp4" ;
 		if (!files.isEmpty()) {
 			try {
-				mf.transferTo(new File(fileName));
+				File f = new File(fileName);
+				mf.transferTo(f);
 				LoggerUtils.debug(getClass(), fileName + " 文件上传成功");
+				LoggerUtils.debug(getClass(), f.getAbsolutePath() + " 文件上传成功");
 			} catch (IllegalStateException | IOException e) {
 				LoggerUtils.error(getClass(), "文件上传失败", e);
 				res.getError().add(buildError("", "文件上传失败!"));