upload
open suspend fun upload(path: String, data: ByteArray, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse(source)
Uploads a file in bucketId under path
Return
the key to the uploaded file
Parameters
path
The path to upload the file to
data
The data to upload
options
Additional options for the upload
Throws
if data to upload is empty
or one of its subclasses if receiving an error response
HttpRequestTimeoutException
if the request timed out
on network related issues
abstract suspend fun upload(path: String, data: UploadData, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse(source)
Uploads a file in bucketId under path
Return
the key to the uploaded file
Parameters
path
The path to upload the file to
data
The data to upload
options
Additional options for the upload
Throws
or one of its subclasses if receiving an error response
HttpRequestTimeoutException
if the request timed out
on network related issues