Created
November 10, 2022 13:11
-
-
Save migueldoctor/7f3c33510d500bd6b7798dfd68b761cd to your computer and use it in GitHub Desktop.
Service Interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.kesizo.demo.services.uploadfilesservice.service | |
import org.springframework.core.io.Resource | |
import org.springframework.web.multipart.MultipartFile | |
import java.nio.file.Path | |
interface UploadFileService { | |
//1) This method will create the folder needed to | |
// store the files | |
fun init():Result<Path> | |
//2) This method will allow upload files | |
fun upload(file: MultipartFile):Result<Boolean> | |
//3) This method will serve the files to download | |
fun download(filename:String):Result<Resource> | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment