x1ongzhu 7 년 전
부모
커밋
6fb417dd29
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/main/java/com/izouma/awesomeadmin/web/PlayerInfoController.java

+ 1 - 0
src/main/java/com/izouma/awesomeadmin/web/PlayerInfoController.java

@@ -295,6 +295,7 @@ public class PlayerInfoController {
                         String ext = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
                         String ext = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
                         video = String.format("/var/videos/%s-%s%s", new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss").format(new Date()), randomCode, ext);
                         video = String.format("/var/videos/%s-%s%s", new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss").format(new Date()), randomCode, ext);
                         file.transferTo(new File(video));
                         file.transferTo(new File(video));
+                        Runtime.getRuntime().exec("chmod 777 " + video);
                         playerInfo.setVideo(video);
                         playerInfo.setVideo(video);
                     } else if ("screenshot".equalsIgnoreCase(file.getName())) {
                     } else if ("screenshot".equalsIgnoreCase(file.getName())) {
                         Random random = new Random();
                         Random random = new Random();