Microsoft.Teams.Apps.Files Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Classes
| Name | Description |
|---|---|
| DownloadedFile |
A buffered, point-in-time snapshot of a downloaded file's bytes that the caller owns. Returned by DownloadAsync(CancellationToken). The bytes are already in memory, so the convenience readers here are synchronous and never re-download. Because it is a snapshot, holding one and reusing it is the way to read the same file several ways without re-fetching through the live IncomingFile handle. |
| FileAccessException |
Raised when the identity used was refused by the storage service. Distinct from FileUrlExpiredException, which is terminal: a pre-authorized URL lapsed, and the SDK does not resolve those bytes another way even when a |
| FileConsentExtensions |
Extension methods for registering file consent invoke handlers. |
| FileConsentValue |
Represents the value of the invoke activity sent when the user acts on a file consent card. |
| FileCredentialException |
Raised when no credential was available for the Graph call. Detectable before any HTTP request. Distinct from FileUrlExpiredException, which is terminal: a pre-authorized URL lapsed, and the SDK does not resolve those bytes another way even when a |
| FileDownloader |
Opens byte streams for inbound files, keyed on conversation scope so every scope's receive path extends this one place rather than branching in callers. |
| FileDownloadInfo |
The content of a |
| FileException |
Base class for the diagnosable failures on the inbound-file path: an expired URL, an unsupported scope, and a refused Graph read. Lets a caller catch those with one |
| FilesAccessor |
Accessor for the uploaded files on the current inbound activity, exposed as "Files" is the uploaded-file view over the raw This covers the file-upload path, not "any uploaded media". What matters is how the content arrived, not the file's MIME type, so file type is unrestricted (pdf, docx, png, etc.) as long as it was sent as an uploaded file. An image sent as a file appears here, but the same image pasted inline does not. |
| FileScopeNotSupportedException |
Raised when file bytes are requested for a conversation scope whose download path is not implemented. Only |
| FileSource |
Where the SDK found an inbound file.
|
| FileSources |
Common file source values. |
| FileUploadInfo |
File upload info for accepted file consent. |
| FileUrlExpiredException |
Raised when an inbound file's short-lived download URL has expired and can no longer fetch bytes. A personal file's pre-authorized Reason distinguishes the two cases; see FileUrlExpiredReason. |
| GraphCredential |
Supplies a bearer token for Graph, and names the identity it belongs to. Resolved at fetch time rather than stored on the file handle, so a handle stays inert and a token is never acquired before it is needed. Returning |
| IncomingFile |
A lazy handle to a file attached to the current inbound activity. Nothing is downloaded until a byte method is called. The handle stays live and holds no memoized bytes, so each of StreamAsync(CancellationToken)/DownloadAsync(CancellationToken)/TextAsync(Encoding, CancellationToken)/SaveAsAsync(String, CancellationToken) fetches afresh. For a personal file that re-fetch is bounded by the short-lived download URL lifetime and may hit its expiry; to read the same file several ways, call DownloadAsync(CancellationToken) once and reuse the returned DownloadedFile. |
| OpenedFileStream |
A freshly opened, single-consumption byte stream plus the metadata resolved while opening it. Owns the underlying HttpResponseMessage; disposing this stream releases the response and connection. Read-only and non-seekable: it hands back the raw response body without leaking the response. |
Enums
| Name | Description |
|---|---|
| FileActor |
The identity a file fetch was attempted as. Reported on FileCredentialException and FileAccessException so a failure names who was refused, not merely that something was. |
| FileUrlExpiredReason |
Distinguishes the two ways an inbound file's short-lived download URL can be found expired. |
Delegates
| Name | Description |
|---|---|
| FileConsentValueHandler |
Delegate for handling file consent invoke activities. |