Skip to content

Instantly share code, notes, and snippets.

@migueldoctor
Created November 10, 2022 13:11
Show Gist options
  • Save migueldoctor/7f3c33510d500bd6b7798dfd68b761cd to your computer and use it in GitHub Desktop.
Save migueldoctor/7f3c33510d500bd6b7798dfd68b761cd to your computer and use it in GitHub Desktop.
Service Interface
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