diff --git a/backend/src/main/java/ovh/herisson/Clyde/Services/StorageService.java b/backend/src/main/java/ovh/herisson/Clyde/Services/StorageService.java index c73dd0b..8059c4e 100644 --- a/backend/src/main/java/ovh/herisson/Clyde/Services/StorageService.java +++ b/backend/src/main/java/ovh/herisson/Clyde/Services/StorageService.java @@ -24,6 +24,14 @@ public class StorageService { public StorageService(FileRepository filerepo){ this.fileRepo = filerepo; + + if(!Files.exists(rootLocation)){ + try { + Files.createDirectories(rootLocation); + } catch(IOException e){ + e.printStackTrace(); + } + } }