feat: enable new content type

- make symfony controller accept application/pdf and image/png formats
This commit is contained in:
yoann 2023-05-17 08:41:25 -10:00
parent 6bb6f1b28a
commit d63a30d28b

View File

@ -211,6 +211,14 @@ class Controller extends AbstractController
return 'application/xml'; return 'application/xml';
} }
if (in_array('application/pdf', $accept) && in_array('application/pdf', $produced)) {
return 'application/pdf';
}
if (in_array('image/png', $accept) && in_array('image/png', $produced)) {
return 'image/png';
}
// If we reach this point, we don't have a common ground between server and client // If we reach this point, we don't have a common ground between server and client
return null; return null;
} }