Skip to content

Support Response::image() and Response::audio() #91

@yncki

Description

@yncki

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions