Skip to content
Snippets Groups Projects

Show pdfs for raise requests embedded

6 files
+ 89
6
Compare changes
  • Side-by-side
  • Inline

Files

@@ -176,6 +176,16 @@ public class RaiseRequestController {
.body(resource);
}
@GetMapping(value = "{id}/proof.pdf", produces = MediaType.APPLICATION_PDF_VALUE)
@PreAuthorize("@authorisationService.canDownloadProof(#id)")
public ResponseEntity<Resource> getProofFile(@PathVariable Long id) throws IOException {
Resource resource = raiseRequestService.downloadFile(id);
return ResponseEntity.ok()
.header("X-Frame-Options", "SAMEORIGIN")
.contentType(MediaType.APPLICATION_PDF)
.body(resource);
}
/**
* Import PayScale for a student
*
Loading