Share via


IHostedFileClient.GetFileInfoAsync Method

Definition

Gets metadata about a file.

public System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileContent?> GetFileInfoAsync(string fileId, Microsoft.Extensions.AI.HostedFileClientOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetFileInfoAsync : string * Microsoft.Extensions.AI.HostedFileClientOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.AI.HostedFileContent>
Public Function GetFileInfoAsync (fileId As String, Optional options As HostedFileClientOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HostedFileContent)

Parameters

fileId
String

The ID of the file.

options
HostedFileClientOptions

Options to configure the request.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

Information about the file, or null if not found.

Exceptions

fileId is null.

fileId is empty or whitespace.

Applies to