Skip to content

Commit

Permalink
fix : logging
Browse files Browse the repository at this point in the history
  • Loading branch information
NameIsUser06 committed Jan 4, 2024
1 parent 2dd8f3d commit f3cb8d4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ public class FileSaveUtil {
public String save(MultipartFile file) {
try {
String fileName = UUID.randomUUID() + "_" + file.getOriginalFilename();
System.out.println(fileName);
Path path = rootPath.resolve(
Paths.get(fileName)
.normalize());
System.out.println(path);
Files.copy(file.getInputStream(), path, StandardCopyOption.REPLACE_EXISTING);
System.out.println("success");
return String.format("%s/%s", rootPath, fileName);
} catch (IOException e) {
throw FileException.EXCEPTION;
Expand Down

0 comments on commit f3cb8d4

Please sign in to comment.