ResumableClient

sealed interface ResumableClient(source)

Represents a resumable client. Can be used to create or continue resumable uploads.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Reads pending uploads from the cache and creates a new ResumableUpload for each of them. This done in parallel, so you can start the uploads independently.

Link copied to clipboard
abstract suspend fun continuePreviousUploads(channelProducer: suspend (source: String, offset: Long) -> ByteReadChannel): List<Deferred<ResumableUpload>>

Reads pending uploads from the cache and creates a new ResumableUpload for each of them. This done in parallel, so you can start the downloads independently.

Link copied to clipboard
open suspend fun createOrContinueUpload(data: ByteArray, source: String, path: String, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload
abstract suspend fun createOrContinueUpload(channel: suspend (offset: Long) -> ByteReadChannel, source: String, size: Long, path: String, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload

Creates a new resumable upload or continues an existing one. If there is an url in the cache for the given Fingerprint, the upload will be continued.

Link copied to clipboard
suspend fun ResumableClient.createOrContinueUpload(path: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload
suspend fun ResumableClient.createOrContinueUpload(path: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload

Creates a new resumable upload or continues an existing one. If there is an url in the cache for the given Fingerprint, the upload will be continued.

Creates a new upload or continues an existing one from the given uri