Create the directory if not exists
This commit is contained in:
		| @ -24,6 +24,14 @@ public class StorageService { | |||||||
|  |  | ||||||
|     public StorageService(FileRepository filerepo){ |     public StorageService(FileRepository filerepo){ | ||||||
|         this.fileRepo = filerepo; |         this.fileRepo = filerepo; | ||||||
|  |  | ||||||
|  | 		if(!Files.exists(rootLocation)){ | ||||||
|  | 			try { | ||||||
|  | 				Files.createDirectories(rootLocation); | ||||||
|  | 			} catch(IOException e){ | ||||||
|  | 				e.printStackTrace(); | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user