Package io.tesler.core.controller
Class FileController
- java.lang.Object
-
- io.tesler.core.controller.FileController
-
@RestController @RequestMapping("#{ (${tesler.api.use-servlet-context-path} == true) ? \'\': \'${tesler.api.path}\'}/file") public class FileController extends Object
-
-
Constructor Summary
Constructors Constructor Description FileController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.HttpEntity<byte[]>
download(Long id, String source, boolean preview)
ResponseDTO
remove(Long id, String source)
ResponseDTO
upload(org.springframework.web.multipart.MultipartFile file, String source)
-
-
-
Method Detail
-
upload
@RequestMapping(method=POST) public ResponseDTO upload(@RequestParam("file") org.springframework.web.multipart.MultipartFile file, @RequestParam(value="source",required=false) String source)
-
download
@RequestMapping(method=GET) public org.springframework.http.HttpEntity<byte[]> download(@RequestParam("id") Long id, @RequestParam(value="source",required=false) String source, @RequestParam(value="preview",required=false,defaultValue="false") boolean preview)
-
remove
@RequestMapping(method=DELETE) public ResponseDTO remove(@RequestParam("id") Long id, @RequestParam("source") String source)
-
-