diff --git a/gymboard-cdn/src/main/java/nl/andrewlalis/gymboardcdn/FileService.java b/gymboard-cdn/src/main/java/nl/andrewlalis/gymboardcdn/FileService.java index 7e52300..88bd847 100644 --- a/gymboard-cdn/src/main/java/nl/andrewlalis/gymboardcdn/FileService.java +++ b/gymboard-cdn/src/main/java/nl/andrewlalis/gymboardcdn/FileService.java @@ -5,10 +5,13 @@ import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import java.io.IOException; +import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; -import java.util.Optional; +/** + * The service that manages storing and retrieving files from a base filesystem. + */ @Service public class FileService { @Value("${app.files.storage-dir}") @@ -32,6 +35,10 @@ public class FileService { return tempFile; } + public Path saveToStorage(String filename, InputStream in) throws IOException { + throw new RuntimeException("Not implemented!"); + } + private Path getStorageDir() throws IOException { Path dir = Path.of(storageDir); if (Files.notExists(dir)) {