FileUploader

interface FileUploader

The FileUploader is responsible for sending and deleting files from given channel

Functions

Link copied to clipboard
abstract fun deleteFile(channelType: String, channelId: String, userId: String, url: String): Result<Unit>

Deletes the file represented by url from the given channel.

Link copied to clipboard
abstract fun deleteImage(channelType: String, channelId: String, userId: String, url: String): Result<Unit>

Deletes the image represented by url from the given channel.

Link copied to clipboard
abstract fun sendFile(channelType: String, channelId: String, userId: String, file: File): Result<UploadedFile>

Uploads a file for the given channel.

abstract fun sendFile(channelType: String, channelId: String, userId: String, file: File, callback: ProgressCallback): Result<UploadedFile>

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

Link copied to clipboard
abstract fun sendImage(channelType: String, channelId: String, userId: String, file: File): Result<UploadedFile>

Uploads an image for the given channel.

abstract fun sendImage(channelType: String, channelId: String, userId: String, file: File, callback: ProgressCallback): Result<UploadedFile>

Uploads an image for the given channel. Progress can be accessed via callback.