sendFile

fun sendFile(channelType: String, channelId: String, file: File, callback: ProgressCallback? = null): Call<UploadedFile>

Uploads a file for the given channel. Progress can be accessed via callback.

The Stream CDN imposes the following restrictions on file uploads:

  • The maximum file size is 100 MB

Return

Executable async Call which completes with Result containing an instance of UploadedFile if the file was successfully uploaded.

Parameters

channelType

The channel type. ie messaging.

channelId

The channel id. ie 123.

file

The file that needs to be uploaded.

callback

The callback to track progress.

See also