Skip to main content
All docs
V26.1
  • MessageSendingEventArgs.Files Property

    Returns the collection of files attached to the chat message.

    Namespace: DevExpress.AIIntegration.Blazor.Chat

    Assembly: DevExpress.AIIntegration.Blazor.Chat.v26.1.dll

    Declaration

    public List<AIChatUploadFileInfo> Files { get; }

    Property Value

    Type Description
    List<AIChatUploadFileInfo>

    The collection of files.

    Remarks

    Use the Files property to access the collection of files attached to the chat message.

    Note

    The Files collection is populated only when a user explicitly attaches files to a message. Subsequent messages can reference files from the chat history, but their Files collection remains empty.

    The following code snippet logs each file attached to the message:

    <DxAIChat MessageSending="OnMessageSending"
              FileUploadEnabled="true" />
    
    @code {
        private async Task OnMessageSending(MessageSendingEventArgs args) {
            if(args.Files != null) {
                foreach(var file in args.Files)
                    Console.WriteLine($"File: {file.Name} ({file.Size} bytes)");
            }
        }
    }
    
    See Also