Docs

Kotlin: Storage

Upload, download, list and remove files, and create signed and public URLs with the Kotlin SDK.

Updated Oct 24, 2026

Upload, download, list and remove files, and create signed and public URLs. Every call runs as the client's signed-in user, so your project's policies and row-level security apply. Types and members are listed in source order; each one links to its HTTP endpoint where it maps to one.

#Types and members

SovariaStorage

Object storage. Bucket rules decide who may read and write where (e.g. "own folder": a user writes to <userId>/…).

class SovariaStorage(private val client: Sovaria)

SovariaStorage.upload

Upload bytes to bucket/path (multipart, like the web SDK).

suspend fun upload(bucket: String, path: String, bytes: ByteArray, contentType: String? = null, upsert: Boolean = false): Map<String, Any?>

upsert replaces an existing object.

SovariaStorage.download

Download an object the caller may read.

suspend fun download(bucket: String, path: String): ByteArray

SovariaStorage.remove

suspend fun remove(bucket: String, path: String)

SovariaStorage.list

suspend fun list(bucket: String, prefix: String? = null): List<Map<String, Any?>>

SovariaStorage.createSignedUrl

A time-limited download URL (for images, sharing…).

suspend fun createSignedUrl(bucket: String, path: String, expiresIn: Int = 3600): String

SovariaStorage.publicUrl

URL of an object in a public bucket.

fun publicUrl(bucket: String, path: String): String