| | |
| | | private String UPLOAD_DIR; |
| | | |
| | | |
| | | @PostConstruct |
| | | void init(){ |
| | | fileLocation = Path.of(UPLOAD_DIR).toAbsolutePath().normalize(); |
| | | try { |
| | | Files.createDirectories(this.fileLocation); |
| | | } catch (Exception ex) { |
| | | throw new RuntimeException("Could not create the directory where the uploaded files will be stored.", ex); |
| | | } |
| | | } |
| | | // @PostConstruct |
| | | // void init(){ |
| | | // fileLocation = Path.of(UPLOAD_DIR).toAbsolutePath().normalize(); |
| | | // try { |
| | | // Files.createDirectories(this.fileLocation); |
| | | // } catch (Exception ex) { |
| | | // throw new RuntimeException("Could not create the directory where the uploaded files will be stored.", ex); |
| | | // } |
| | | // } |
| | | |
| | | } |