Stream Chat Unreal SDK
Loading...
Searching...
No Matches
AttachmentPicker.h
1// Copyright 2026 Stream.IO, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
12{
14 FString FileName;
15
17 TArray<uint8> Content;
18
20 bool bIsImage = false;
21};
22
41class STREAMCHATUI_API FAttachmentPicker
42{
43public:
46 using FOnPicked = TFunction<void(const TOptional<FPickedAttachment>&)>;
47
49 using FProvider = TFunction<void(FOnPicked)>;
50
52 static void SetProvider(FProvider);
53 static void ClearProvider();
54 static bool HasProvider();
55
57 static void Pick(FOnPicked);
58
59private:
60 static FProvider Provider;
61};
Supplies the message composer with a way to pick a file to attach.
Definition AttachmentPicker.h:42
TFunction< void(FOnPicked)> FProvider
Shows a picker and reports back what the user chose.
Definition AttachmentPicker.h:49
TFunction< void(const TOptional< FPickedAttachment > &)> FOnPicked
Definition AttachmentPicker.h:46
A file the app picked, ready to be uploaded and attached to a message.
Definition AttachmentPicker.h:12
FString FileName
Original filename, shown to recipients and used by the backend to infer the MIME type.
Definition AttachmentPicker.h:14
TArray< uint8 > Content
Raw bytes of the file.
Definition AttachmentPicker.h:17
bool bIsImage
Upload through the image endpoint, so recipients get a thumbnail and render it inline.
Definition AttachmentPicker.h:20