Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Channel → Send Image

AI-generated

Summary

Upload and send an image to a specified channel in Stream Chat by providing the channel type, channel ID, local file path, and optionally the file name.

Inputs

  • Channel Type — Type of the channel (e.g., "messaging" for 1-on-1 chats, "team" for group channels, "livestream" for broadcast channels). Defaults to "messaging."
  • Channel ID (required) — Unique identifier of the channel to which the image will be sent (e.g., "general", "random"). This, combined with the channel type, forms the unique channel identifier used internally.
  • File Path (required) — Local path to the image file that will be uploaded and sent to the channel.
  • File Name — Optional name for the uploaded image file.

Output shape

a single record containing the response JSON from the Stream Chat API, representing details of the sent image message

The output includes the Stream Chat server response for the sent image. The operation uploads the image file from the provided local path and posts it to the specified channel.

Examples

Example 1: Send an image to a messaging channel "general"

Set Channel Type to "messaging", Channel ID to "general", and provide a valid local File Path for the image. Optionally specify File Name.

Discussion