downloadPublic

abstract suspend fun downloadPublic(path: String, options: DownloadOptionBuilder.() -> Unit = {}): ByteArray(source)

Downloads a file from bucketId under path using the public url

Return

The file as a byte array

Parameters

path

The path to download

options

Additional options for the download

Throws

or one of its subclasses if receiving an error response

HttpRequestTimeoutException

if the request timed out

on network related issues


abstract suspend fun downloadPublic(path: String, channel: ByteWriteChannel, options: DownloadOptionBuilder.() -> Unit = {})(source)

Downloads a file from bucketId under path using the public url

Parameters

path

The path to download

channel

The channel to write the data to

options

Additional options for the download

Throws

or one of its subclasses if receiving an error response

HttpRequestTimeoutException

if the request timed out

on network related issues