We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5b86ebd + 01cefbd commit 00a7478Copy full SHA for 00a7478
core/Controller/ReferenceController.php
@@ -58,10 +58,13 @@ public function preview(string $referenceId): Response {
58
$appData = $this->appDataFactory->get('core');
59
$folder = $appData->getFolder('opengraph');
60
$file = $folder->getFile($referenceId);
61
+ $contentType = $reference === null || $reference->getImageContentType() === null
62
+ ? $file->getMimeType()
63
+ : $reference->getImageContentType();
64
$response = new DataDownloadResponse(
65
$file->getContent(),
66
$referenceId,
- $reference === null ? $file->getMimeType() : $reference->getImageContentType()
67
+ $contentType
68
);
69
} catch (NotFoundException|NotPermittedException $e) {
70
$response = new DataResponse('', Http::STATUS_NOT_FOUND);
0 commit comments