Language

FileDownloader.OpenFileStreamAsync Method

Definition

Overloads

Name Description
OpenFileStreamAsync(ConversationType, Uri, String, Boolean, CancellationToken)

Open a byte stream for an inbound file. Only personal is implemented; other scopes throw FileScopeNotSupportedException until their Graph receive path lands.

OpenFileStreamAsync(ConversationType, Uri, Uri, String, Boolean, GraphCredential, CancellationToken)

Open a byte stream for an inbound file, resolving it through Microsoft Graph when the pre-authorized download URL is absent.

Only personal is implemented; other scopes throw FileScopeNotSupportedException until their Graph receive path lands.

OpenFileStreamAsync(ConversationType, Uri, String, Boolean, CancellationToken)

Open a byte stream for an inbound file. Only personal is implemented; other scopes throw FileScopeNotSupportedException until their Graph receive path lands.

public System.Threading.Tasks.Task<Microsoft.Teams.Apps.Files.OpenedFileStream> OpenFileStreamAsync(Microsoft.Teams.Apps.Schema.ConversationType? scope, Uri? downloadUrl, string? contentType, bool priorFetchSucceeded, System.Threading.CancellationToken cancellationToken);
member this.OpenFileStreamAsync : Microsoft.Teams.Apps.Schema.ConversationType * Uri * string * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Apps.Files.OpenedFileStream>
Public Function OpenFileStreamAsync (scope As ConversationType, downloadUrl As Uri, contentType As String, priorFetchSucceeded As Boolean, cancellationToken As CancellationToken) As Task(Of OpenedFileStream)

Parameters

downloadUrl
Uri
contentType
String
priorFetchSucceeded
Boolean
cancellationToken
CancellationToken

Returns

Applies to

OpenFileStreamAsync(ConversationType, Uri, Uri, String, Boolean, GraphCredential, CancellationToken)

Open a byte stream for an inbound file, resolving it through Microsoft Graph when the pre-authorized download URL is absent.

Only personal is implemented; other scopes throw FileScopeNotSupportedException until their Graph receive path lands.

public System.Threading.Tasks.Task<Microsoft.Teams.Apps.Files.OpenedFileStream> OpenFileStreamAsync(Microsoft.Teams.Apps.Schema.ConversationType? scope, Uri? downloadUrl, Uri? contentUrl, string? contentType, bool priorFetchSucceeded, Microsoft.Teams.Apps.Files.GraphCredential? credential, System.Threading.CancellationToken cancellationToken);
member this.OpenFileStreamAsync : Microsoft.Teams.Apps.Schema.ConversationType * Uri * Uri * string * bool * Microsoft.Teams.Apps.Files.GraphCredential * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Teams.Apps.Files.OpenedFileStream>
Public Function OpenFileStreamAsync (scope As ConversationType, downloadUrl As Uri, contentUrl As Uri, contentType As String, priorFetchSucceeded As Boolean, credential As GraphCredential, cancellationToken As CancellationToken) As Task(Of OpenedFileStream)

Parameters

scope
ConversationType

Conversation scope; the dispatcher is keyed on this.

downloadUrl
Uri

Short-lived, pre-authorized download URL (personal scope).

contentUrl
Uri

Browsable URL to the item, used as the Graph sharing locator when no downloadUrl is present.

contentType
String

MIME type reported by the incoming file, used as a fallback when the response omits one.

priorFetchSucceeded
Boolean

Whether an earlier fetch through the same handle already succeeded.

credential
GraphCredential

Credential used for the Graph fetch path. Absent means no Graph route is available, so an expired URL cannot be recovered.

cancellationToken
CancellationToken

A token to cancel opening the stream.

Returns

Applies to