-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Support Response::image() and Response::audio() (currently throws NotImplementedException)
Binary response helpers for images and audio—Response::image() and Response::audio()—are not currently supported and throw NotImplementedException. The generic Response::blob() is also not supported by tools, so there’s no viable workaround for returning binary payloads.
Current behavior
Response::image() → throws NotImplementedException
Response::audio() → throws NotImplementedException
Response::blob() → not supported by the tools layer (binaries can’t be surfaced/streamed correctly)
Expected behavior
Provide first-class support for binary responses:
Response::image($binaryOrStream, string $mime = 'image/png', ?string $filename = null, array $headers = [])
Response::audio($binaryOrStream, string $mime = 'audio/mpeg', ?string $filename = null, array $headers = [])
(Optional) generic helper:
Response::blob($binaryOrStream, string $mime, ?string $filename = null, array $headers = [])
Tools integration should correctly pass through/preview or stream these responses.