Stream Chat Unreal SDK
Loading...
Searching...
No Matches
FAttachment Struct Reference

A file, image or link attached to a message. More...

#include <Attachment.h>

Public Member Functions

 FAttachment (const FAttachmentDto &)
 
FAttachmentDto ToDto () const
 Convert back into the wire format for sending.
 
FString GetUrl () const
 The URL of the attached content, whichever field the backend populated.
 

Public Attributes

EAttachmentType Type = EAttachmentType::Unknown
 Kind of content, used to decide how to display it.
 
FString Title
 Display title, conventionally the original filename.
 
FString AssetUrl
 URL of the uploaded file. Set this for non-image attachments.
 
FString ImageUrl
 URL of the uploaded image. Set this for image attachments.
 
FString ThumbUrl
 URL of a smaller preview, when the backend generated one. Read-only, set by the backend.
 
FString Text
 Description text.
 
FString MimeType
 MIME type of the attached file. Read-only, determined by the backend.
 
int32 FileSize = 0
 Size of the attached file in bytes. Read-only, determined by the backend.
 
FString RawType
 The wire value of Type, kept so an unrecognised type still round trips unchanged.
 
FAdditionalFields ExtraData
 Fields the SDK does not model.
 

Detailed Description

A file, image or link attached to a message.

Upload content with UChatChannel::UploadFile or UploadImage, then put the URL those return into an attachment and pass it to UChatChannel::SendMessage.

Member Function Documentation

◆ GetUrl()

FString FAttachment::GetUrl ( ) const

The URL of the attached content, whichever field the backend populated.

Images arrive in ImageUrl and everything else in AssetUrl, so callers that just want something to fetch should use this rather than picking a field.


The documentation for this struct was generated from the following files: