Create the directory if not exists #100

Merged
tonitch merged 1 commits from tonitch/back/upload/createDir into master 2024-03-14 22:36:49 +01:00
Showing only changes of commit 08c3800bae - Show all commits

View File

@ -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();
}
}
}