File Handling
This section covers how your app receives files and reads their bytes.
File handling is being rolled out incrementally. Today the SDK supports receiving files attached to messages in personal (1:1) chats via the TypeScript, Python, and C# SDKs.
Files vs. attachments
In personal scope, Activity.Attachments carries every non-text part of a received message: files the user attached, but also Adaptive Cards, @mentions, link previews, and other content the client or the platform adds. A file is the specific subset of attachments that describes a document the user attached, one whose ContentType is file.download.info.
The context.Files accessor is the attached-file view over that raw array. It maps each attached file to a lazy handle you can download from, and skips everything else. The original Activity.Attachments array is always available when you need the raw payload or a non-file attachment.
In this section
- Receiving Files — read files a user attaches to a message, stream or download their bytes, and handle unsupported scopes and expired links.