summaryrefslogtreecommitdiffstats
path: root/lib/Controller/NavigationController.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Controller/NavigationController.php')
-rw-r--r--lib/Controller/NavigationController.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/lib/Controller/NavigationController.php b/lib/Controller/NavigationController.php
index b9b256a0..b613fb1e 100644
--- a/lib/Controller/NavigationController.php
+++ b/lib/Controller/NavigationController.php
@@ -291,9 +291,11 @@ class NavigationController extends Controller {
*/
public function documentGet(string $id): Response {
try {
- $file = $this->documentService->getFromCache($id);
+ $mime = '';
+ $file = $this->documentService->getFromCache($id, $mime);
+
+ return new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => $mime]);
- return new FileDisplayResponse($file, Http::STATUS_OK);
} catch (Exception $e) {
return $this->fail($e);
}
@@ -311,9 +313,10 @@ class NavigationController extends Controller {
public function documentGetPublic(string $id): Response {
try {
- $file = $this->documentService->getFromCache($id, true);
+ $mime = '';
+ $file = $this->documentService->getFromCache($id, $mime, true);
- return new FileDisplayResponse($file);
+ return new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => $mime]);
} catch (Exception $e) {
return $this->fail($e);
}
@@ -331,9 +334,10 @@ class NavigationController extends Controller {
public function resizedGet(string $id): Response {
try {
- $file = $this->documentService->getResizedFromCache($id);
+ $mime = '';
+ $file = $this->documentService->getResizedFromCache($id, $mime);
- return new FileDisplayResponse($file);
+ return new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => $mime]);
} catch (Exception $e) {
return $this->fail($e);
}
@@ -351,12 +355,14 @@ class NavigationController extends Controller {
public function resizedGetPublic(string $id): Response {
try {
- $file = $this->documentService->getResizedFromCache($id, true);
+ $mime = '';
+ $file = $this->documentService->getResizedFromCache($id, $mime, true);
- return new FileDisplayResponse($file);
+ return new FileDisplayResponse($file, Http::STATUS_OK, ['Content-Type' => $mime]);
} catch (Exception $e) {
return $this->fail($e);
}
}
}
+