upload

suspend fun upload(byteArray: ByteArray, config: UploadFileConfig? = null): File

Uploads a file to the API.

Return

The uploaded file.

Parameters

byteArray

The byte array of the file to upload.

config

Optional configuration for the upload.


suspend fun upload(channel: ByteReadChannel, size: Long, config: UploadFileConfig? = null): File

Uploads a file to the API.

Return

The uploaded file.

Parameters

channel

The ByteReadChannel of the file to upload.

size

The size of the file to upload.

config

Optional configuration for the upload.