FileClientUploadStreamAsync Method
Uploads a file stream as a
RemoteFile to the remote server.
Namespace: GenerativeAI.ClientsAssembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
public Task<RemoteFile> UploadStreamAsync(
Stream stream,
string displayName,
string mimeType,
Action<double>? progressCallback = null,
CancellationToken cancellationToken = default
)
- stream Stream
- The stream representing the file to upload.
- displayName String
- The display name of the file being uploaded.
- mimeType String
- The MIME type of the file being uploaded.
- progressCallback ActionDouble (Optional)
- An optional callback to track the progress of the upload, represented as a percentage.
- cancellationToken CancellationToken (Optional)
[Missing <param name="cancellationToken"/> documentation for "M:GenerativeAI.Clients.FileClient.UploadStreamAsync(System.IO.Stream,System.String,System.String,System.Action{System.Double},System.Threading.CancellationToken)"]
TaskRemoteFileThe uploaded
RemoteFile information.