@Controller
@RequestMapping({"/${dbadmin.baseUrl}/download","/${dbadmin.baseUrl}/download/"})
public class DownloadController
extends Object
Controller to serve file or images (`@DisplayImage`)
-
Constructor Summary
Constructors
-
Method Summary
org.springframework.http.ResponseEntity<byte[]>
org.springframework.http.ResponseEntity<byte[]>
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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)