diff --git a/Classes/Definition/ContentTypeDefinition.php b/Classes/Definition/ContentTypeDefinition.php index 65404d3..2efa7c8 100644 --- a/Classes/Definition/ContentTypeDefinition.php +++ b/Classes/Definition/ContentTypeDefinition.php @@ -10,6 +10,8 @@ class ContentTypeDefinition { public const FILE_PLAIN = 'filePlain'; + public const IMAGE_JPEG = 'imageJpeg'; + public const JSON = 'json'; public const TEXT = 'text'; diff --git a/Classes/Middleware/MiddlewareApiAbstract.php b/Classes/Middleware/MiddlewareApiAbstract.php index a130c05..05c1ea3 100644 --- a/Classes/Middleware/MiddlewareApiAbstract.php +++ b/Classes/Middleware/MiddlewareApiAbstract.php @@ -178,6 +178,11 @@ public function createResponse(string $string, string $contentType = ContentType break; + case ContentTypeDefinition::IMAGE_JPEG: + $response = $response->withHeader('Content-Type', 'image/jpeg'); + + break; + case ContentTypeDefinition::XML: $response = $response->withHeader('Content-Type', 'application/xml; charset=utf-8');