Stream Chat Unreal SDK
Loading...
Searching...
No Matches
Attachment.h
1// Copyright 2026 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "AdditionalFields.h"
6#include "CoreMinimal.h"
7
8#include "Attachment.generated.h"
9
10struct FAttachmentDto;
11
16UENUM(BlueprintType)
17enum class EAttachmentType : uint8
18{
20 Unknown,
22 Image,
24 File,
25 Video,
26 Audio,
28 Giphy,
30 Link
31};
32
40USTRUCT(BlueprintType)
41struct STREAMCHAT_API FAttachment
42{
43 GENERATED_BODY()
44
45 FAttachment() = default;
46 explicit FAttachment(const FAttachmentDto&);
47
49 FAttachmentDto ToDto() const;
50
57 FString GetUrl() const;
58
60 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stream Chat|Attachment")
62
64 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stream Chat|Attachment")
65 FString Title;
66
68 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stream Chat|Attachment")
69 FString AssetUrl;
70
72 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stream Chat|Attachment")
73 FString ImageUrl;
74
76 UPROPERTY(BlueprintReadOnly, Category = "Stream Chat|Attachment")
77 FString ThumbUrl;
78
80 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stream Chat|Attachment")
81 FString Text;
82
84 UPROPERTY(BlueprintReadOnly, Category = "Stream Chat|Attachment")
85 FString MimeType;
86
88 UPROPERTY(BlueprintReadOnly, Category = "Stream Chat|Attachment")
89 int32 FileSize = 0;
90
92 UPROPERTY(BlueprintReadOnly, Category = "Stream Chat|Attachment", AdvancedDisplay)
93 FString RawType;
94
96 UPROPERTY(BlueprintReadWrite, Category = "Stream Chat|Attachment", AdvancedDisplay)
97 FAdditionalFields ExtraData;
98};
EAttachmentType
What kind of content an attachment holds.
Definition Attachment.h:18
@ Text
Text of the message.
@ Type
Type of the message.
@ File
Any other uploaded file, offered as a download.
@ Unknown
A type this version of the SDK does not know about. The raw value is kept in FAttachment::RawType.
@ Link
A preview the backend generated by scraping a URL in the message text.
@ Giphy
A Giphy result, produced by the /giphy command.
@ Image
A still image, rendered inline.
#/components/schemas/Attachment A file, image or link attached to a message.
Definition AttachmentDto.h:22
int32 FileSize
Definition AttachmentDto.h:61
FString AssetUrl
URL of the uploaded file. Set for non-image attachments.
Definition AttachmentDto.h:44
FString ThumbUrl
URL of a smaller preview of the image, when the backend generated one.
Definition AttachmentDto.h:52
FString Title
Display title, conventionally the original filename.
Definition AttachmentDto.h:32
FString MimeType
MIME type of the attached file, e.g. image/png
Definition AttachmentDto.h:56
FString ImageUrl
URL of the uploaded image. Set for image attachments.
Definition AttachmentDto.h:48
A file, image or link attached to a message.
Definition Attachment.h:42