Skip to content

Commit

Permalink
Fixing LFI
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 29, 2024
1 parent 5a76b53 commit 8682058
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ public RespModel<String> uploadRecord(@RequestParam(name = "file") MultipartFile
if (!uuidFolder.exists()) {
uuidFolder.mkdirs();
}

String fileName = file.getOriginalFilename();
String newName = fileName.substring(0, fileName.indexOf(".mp4")) + "-" + index + ".mp4";
File local = new File(uuidFolder.getPath() + File.separator + newName);
if (fileName != null) {
fileName = new File(fileName).getName();
String newName = fileName.substring(0, fileName.indexOf(".mp4")) + "-" + index + ".mp4";
File local = new File(uuidFolder.getPath() + File.separator + newName);
}
RespModel<String> responseModel;
try {
file.transferTo(local.getAbsoluteFile());
Expand Down

0 comments on commit 8682058

Please sign in to comment.