@@ 52-59 (lines=8) @@ | ||
49 | * @param $id |
|
50 | * @return StreamedResponse |
|
51 | */ |
|
52 | public function downloadAction(Request $request, $id) |
|
53 | { |
|
54 | $object = $this->admin->getObject($id); |
|
55 | ||
56 | $this->admin->checkAccess('show', $object); |
|
57 | ||
58 | return $this->get(DownloadUtility::class)->getStreamedResponse($object, new DownloadParameterBag($request->query->all())); |
|
59 | } |
|
60 | ||
61 | /** |
|
62 | * @param Request $request |
|
@@ 66-73 (lines=8) @@ | ||
63 | * @param int $id |
|
64 | * @return RedirectResponse |
|
65 | */ |
|
66 | public function imageAction(Request $request, $id, $width, $height) |
|
67 | { |
|
68 | $object = $this->admin->getObject($id); |
|
69 | ||
70 | $this->admin->checkAccess('show', $object); |
|
71 | ||
72 | return $this->get(ImageUtility::class)->getRedirectResponse($object, new ImageParameterBag($width, $height, $request->query->all())); |
|
73 | } |
|
74 | } |
|
75 |