uploadToSignedUrl

open suspend fun uploadToSignedUrl(path: String, token: String, data: ByteArray, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse(source)

Uploads a file in bucketId under path using a pre-signed url

Return

the key of the uploaded file

Parameters

path

The path to upload the file to

token

The pre-signed url token

data

The data to upload

options

Additional options for the upload

Throws

if data to upload is empty

containing an error code, if receiving an error response

HttpRequestTimeoutException

if the request timed out

HttpRequestException

on network related issues


abstract suspend fun uploadToSignedUrl(path: String, token: String, data: UploadData, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse(source)

Uploads a file in bucketId under path using a presigned url

Return

the key of the uploaded file

Parameters

path

The path to upload the file to

token

The presigned url token

data

The data to upload

options

Additional options for the upload

Throws

containing an error code, if receiving an error response

HttpRequestTimeoutException

if the request timed out

HttpRequestException

on network related issues