UploadFileUseCase

Uploads a PlatformFile, reporting progress as it goes — backs the UploadFile event, meant to be paired with OpenFilePicker/GetFile's PlatformFile output. Reachable via get<UploadFileUseCase>().

Constructors

Link copied to clipboard
constructor(repository: MosaicRepository)

Types

Link copied to clipboard
class Params(val url: String?, val headers: Map<String, String>?, val httpMethod: HttpMethod, val contentType: String?, val platformFile: PlatformFile, val onProgress: suspend (Float) -> Unit = {})

Functions

Link copied to clipboard
open suspend override fun execute(params: UploadFileUseCase.Params): Result<UploadResult>
Link copied to clipboard
suspend operator fun invoke(params: UploadFileUseCase.Params): Result<UploadResult>