Docs

Swift: Storage

Upload, download, list and remove files, and create signed and public URLs with the Swift 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>/…).

public final class SovariaStorage: @unchecked Sendable

SovariaStorage.upload

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

public func upload(_ bucket: String, _ path: String, _ bytes: Data, contentType: String? = nil, upsert: Bool = false) async throws -> [String: Any]

upsert replaces an existing object.

SovariaStorage.download

Download an object the caller may read.

public func download(_ bucket: String, _ path: String) async throws -> Data

SovariaStorage.remove

public func remove(_ bucket: String, _ path: String) async throws

SovariaStorage.list

public func list(_ bucket: String, prefix: String? = nil) async throws -> [[String: Any]]

SovariaStorage.createSignedURL

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

public func createSignedURL(_ bucket: String, _ path: String, expiresIn: Int = 3600) async throws -> String

SovariaStorage.publicURL

URL of an object in a public bucket.

public func publicURL(_ bucket: String, _ path: String) throws -> String