FileStorageClient class

This API endpoint allows the uploading of files to, and deleting files from, a Stream-provided CDN.

Constructors

FileStorageClient(FilesAPI _files, {Token? userToken, String? secret})
Initializes a FileStorageClient object
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secret String?
Your API secret
final
userToken Token?
Your user token obtain via the dashboard. Required if you are using the sdk client side
final

Methods

delete(String url) Future<void>
Delete a file using the url returned by the APIs Usage:
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshUrl(String targetUrl) Future<String?>
Explicitly refresh CDN urls for uploaded images on the Stream CDN (only needed for files on the Stream CDN).
toString() String
A string representation of this object.
inherited
upload(AttachmentFile file, {OnSendProgress? onSendProgress, CancelToken? cancelToken}) Future<String?>
  • Upload a File instance or a readable stream of data Usage:
  • Operators

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