Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RequestMapping(value = "/aboutunion/{year}/{name}")
- public void getDocument(@PathVariable String name,
- @PathVariable String year,
- ServletResponse response) {
- File image = storageService.getDocumentByNameAndLanguage(year, name);
- try {
- InputStream inputStream = new FileInputStream(image);
- IOUtils.copy(inputStream, response.getOutputStream());
- response.flushBuffer();
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement