Class DownloadController

java.lang.Object
tech.ailef.dbadmin.external.controller.DownloadController

@Controller @RequestMapping({"/${dbadmin.baseUrl}/download","/${dbadmin.baseUrl}/download/"}) public class DownloadController extends Object
Controller to serve file or images (`@DisplayImage`)
  • Constructor Details

    • DownloadController

      public DownloadController()
  • Method Details

    • serveImage

      @GetMapping(value="/{className}/{fieldName}/{id}/image", produces="image/jpeg") @ResponseBody public org.springframework.http.ResponseEntity<byte[]> serveImage(@PathVariable String className, @PathVariable String fieldName, @PathVariable String id)
    • serveFile

      @GetMapping("/{className}/{fieldName}/{id}") @ResponseBody public org.springframework.http.ResponseEntity<byte[]> serveFile(@PathVariable String className, @PathVariable String fieldName, @PathVariable String id)