@RequestMapping("/settings/{imageId}")
    public String getImage(@PathVariable Integer imageId,
                           HttpServletResponse response,
                           @RequestParam(required = false, defaultValue = "false") Boolean download){
        HomePageItem homePageItem = homePageItemService.getItem(imageId);
        OutputStream out = null;
        try {
            if(download){
                response.setHeader("Content-Disposition", "attachment;filename=\"" +homePageItem.getImageName() + "\"");
            }
            else {
                response.setHeader("Content-Disposition", "inline;filename=\"" +homePageItem.getImageName() + "\"");
            }
            out = response.getOutputStream();
            response.setContentType(homePageItem.getImageContentType());
            out.write(homePageItem.getImageData());

        } catch (IOException e) {
            e.printStackTrace();
        }
        finally {
            if(out != null){
                try {
                    out.flush();
                    out.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
        return null;
    }