CdnClient class abstract interface

Content Delivery Network (CDN) client for file operations.

Provides methods for uploading files and images to the CDN and managing uploaded content through the Stream Core API. Supports progress tracking and request cancellation for optimal user experience.

All operations return Result objects for consistent error handling across the SDK. Upload operations support optional progress callbacks and cancellation tokens for better control over file transfers.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteFile(String url, {CancelToken? cancelToken}) Future<Result<void>>
Deletes a file from the CDN using its url.
deleteImage(String url, {CancelToken? cancelToken}) Future<Result<void>>
Deletes an image from the CDN using its url.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
uploadFile(AttachmentFile file, {ProgressCallback? onProgress, CancelToken? cancelToken}) Future<Result<UploadedFile>>
Uploads a file to the CDN.
uploadImage(AttachmentFile image, {ProgressCallback? onProgress, CancelToken? cancelToken}) Future<Result<UploadedFile>>
Uploads an image file to the CDN.

Operators

operator ==(Object other) bool
The equality operator.
inherited