Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Bucket(val createdAt: Instant, val id: String, val name: String, val owner: String, val updatedAt: Instant, val public: Boolean, val allowedMimeTypes: List<String>? = null, val fileSizeLimit: Long? = null, val type: BucketType? = null)

Represents a storage bucket

Link copied to clipboard
interface BucketApi

The api for interacting with a bucket

Link copied to clipboard

A builder for Buckets

Link copied to clipboard

Represents the available columns for sorting bucket results.

Link copied to clipboard

Type of storage bucket

Link copied to clipboard

Interface for bucket file url modifiers

Link copied to clipboard
class DownloadOptionBuilder(transform: ImageTransformation.() -> Unit = {}, httpRequestOverrides: MutableList<HttpRequestOverride> = mutableListOf()) : BucketUrlBuilder

Builder for downloading files with additional options

Link copied to clipboard
sealed interface DownloadStatus

Represents the status of a download

Link copied to clipboard
@Serializable
data class FileObject(val name: String, val id: String?, val updatedAt: Instant?, val createdAt: Instant?, val lastAccessedAt: Instant?, val metadata: JsonObject?)

Represents a file or a folder in a bucket. If the item is a folder, everything except name is null.

Link copied to clipboard
@Serializable
data class FileObjectV2(val name: String, val id: String?, val version: String, val bucketId: String? = null, val updatedAt: Instant? = null, val createdAt: Instant, val lastAccessedAt: Instant? = null, val metadata: JsonObject? = null, val size: Long, val rawContentType: String, val etag: String? = null, val lastModified: Instant? = null, val cacheControl: String? = null, serializer: SupabaseSerializer = KotlinXSerializer())

Represents a file or a folder in a bucket. If the item is a folder, everything except name is null.

Link copied to clipboard

A file size limit for buckets

Link copied to clipboard
data class FileUploadResponse(val id: String? = null, val path: String, val key: String? = null)

The response of a file upload

Link copied to clipboard
data class ForceDownload(val fileName: String? = null)

Forces a download for a storage url with an optional fileName

Link copied to clipboard

Represents a transformation for an image. Used for Storage objects

Link copied to clipboard
@Serializable
data class SignedUrl(val error: String? = null, val signedURL: String, val path: String)

Represents a signed url

Link copied to clipboard

Represents the sort order for query results.

Link copied to clipboard
interface Storage : MainPlugin<Storage.Config> , CustomSerializationPlugin

Plugin for interacting with the Supabase Storage API

Link copied to clipboard
data class StorageItem(val path: String, val bucketId: String, val authenticated: Boolean)

Represents a file in the storage bucket.

Link copied to clipboard

A filter builder for BucketApi.list and Storage.listBuckets

Link copied to clipboard
data class UploadData(val stream: ByteReadChannel, val size: Long)

Represents the data to upload

Link copied to clipboard
class UploadOptionBuilder(serializer: SupabaseSerializer, var upsert: Boolean = false, var userMetadata: JsonObject? = null, var contentType: ContentType? = null, httpRequestOverrides: MutableList<HttpRequestOverride> = mutableListOf())

Builder for uploading files with additional options

Link copied to clipboard
data class UploadSignedUrl(val url: String, val path: String, val token: String)

A signed url to upload a file

Link copied to clipboard
sealed interface UploadStatus

Represents the status of an upload

Properties

Link copied to clipboard
val SupabaseClient.storage: Storage

Supabase Storage is a simple way to store large files for various purposes

Functions

Link copied to clipboard

Can be used if you want to quickly access a file under an url with your auth_token using a custom download method.

Link copied to clipboard

Creates a StorageItem for an authenticated file.

Link copied to clipboard
suspend fun ResumableClient.continuePreviousFileUploads(): List<ERROR CLASS: Inconsistent type: kotlinx/coroutines/Deferred<io/github/jan/supabase/storage/resumable/ResumableUpload> (parameters.size = 0, arguments.size = 1)>

Reads pending uploads from the cache and creates a new ResumableUpload for each of them. This done in parallel, so you can start the uploads independently.

Link copied to clipboard

Creates a new resumable upload or continues an existing one. If there is an url in the cache for the given Fingerprint, the upload will be continued.

suspend fun ResumableClient.createOrContinueUpload(path: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload

Creates a new upload or continues an existing one from the given uri

Link copied to clipboard
fun BucketApi.downloadAuthenticatedAsFlow(path: String, channel: ByteWriteChannel, options: DownloadOptionBuilder.() -> Unit = {}): Flow<DownloadStatus>

Downloads a file from BucketApi.bucketId under path

Link copied to clipboard
suspend fun BucketApi.downloadAuthenticatedTo(path: String, file: File, options: DownloadOptionBuilder.() -> Unit = {})
suspend fun BucketApi.downloadAuthenticatedTo(path: String, file: Path, options: DownloadOptionBuilder.() -> Unit = {})

Downloads a file from BucketApi.bucketId under path and saves it to file

Link copied to clipboard
fun BucketApi.downloadAuthenticatedToAsFlow(path: String, file: File, options: DownloadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/DownloadStatus> (parameters.size = 0, arguments.size = 1)
fun BucketApi.downloadAuthenticatedToAsFlow(path: String, file: Path, options: DownloadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/DownloadStatus> (parameters.size = 0, arguments.size = 1)

Downloads a file from BucketApi.bucketId under path and saves it to file

Link copied to clipboard
fun BucketApi.downloadPublicAsFlow(path: String, channel: ByteWriteChannel, options: DownloadOptionBuilder.() -> Unit = {}): Flow<DownloadStatus>

Downloads a file from BucketApi.bucketId under path using the public url

Link copied to clipboard
suspend fun BucketApi.downloadPublicTo(path: String, file: File, options: DownloadOptionBuilder.() -> Unit = {})
suspend fun BucketApi.downloadPublicTo(path: String, file: Path, options: DownloadOptionBuilder.() -> Unit = {})

Downloads a file from BucketApi.bucketId under path and saves it to file

Link copied to clipboard
fun BucketApi.downloadPublicToAsFlow(path: String, file: File, options: DownloadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/DownloadStatus> (parameters.size = 0, arguments.size = 1)
fun BucketApi.downloadPublicToAsFlow(path: String, file: Path, options: DownloadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/DownloadStatus> (parameters.size = 0, arguments.size = 1)

Downloads a file from BucketApi.bucketId under path and saves it to file

Link copied to clipboard

Creates a StorageItem for a public file.

Link copied to clipboard
suspend fun BucketApi.update(path: String, file: File, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse
suspend fun BucketApi.update(path: String, file: Path, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse

Updates a file in BucketApi.bucketId under path

suspend fun BucketApi.update(path: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse

Updates a file in BucketApi.bucketId under path

Link copied to clipboard
fun BucketApi.updateAsFlow(path: String, file: File, options: UploadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/UploadStatus> (parameters.size = 0, arguments.size = 1)
fun BucketApi.updateAsFlow(path: String, file: Path, options: UploadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/UploadStatus> (parameters.size = 0, arguments.size = 1)

Updates a file in BucketApi.bucketId under path

fun BucketApi.updateAsFlow(path: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Updates a file in BucketApi.bucketId under path

fun BucketApi.updateAsFlow(path: String, data: UploadData, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Uploads a file in BucketApi.bucketId under path

fun BucketApi.updateAsFlow(path: String, data: ByteArray, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Updates a file in BucketApi.bucketId under path

Link copied to clipboard
suspend fun BucketApi.upload(path: String, file: File, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse
suspend fun BucketApi.upload(path: String, file: Path, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse

Uploads a file in BucketApi.bucketId under path

suspend fun BucketApi.upload(path: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse

Uploads a file in BucketApi.bucketId under path

Link copied to clipboard
fun BucketApi.uploadAsFlow(path: String, file: File, options: UploadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/UploadStatus> (parameters.size = 0, arguments.size = 1)
fun BucketApi.uploadAsFlow(path: String, file: Path, options: UploadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/UploadStatus> (parameters.size = 0, arguments.size = 1)

Uploads a file in BucketApi.bucketId under path

fun BucketApi.uploadAsFlow(path: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Uploads a file in BucketApi.bucketId under path

fun BucketApi.uploadAsFlow(path: String, data: UploadData, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Updates a file in BucketApi.bucketId under path

fun BucketApi.uploadAsFlow(path: String, data: ByteArray, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Uploads a file in BucketApi.bucketId under path

Link copied to clipboard
suspend fun BucketApi.uploadToSignedUrl(path: String, token: String, file: File, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse
suspend fun BucketApi.uploadToSignedUrl(path: String, token: String, file: Path, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse

Uploads a file in BucketApi.bucketId under path using a presigned url

suspend fun BucketApi.uploadToSignedUrl(path: String, token: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse

Uploads a file in BucketApi.bucketId under path using a presigned url

Link copied to clipboard
fun BucketApi.uploadToSignedUrlAsFlow(path: String, token: String, file: File, options: UploadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/UploadStatus> (parameters.size = 0, arguments.size = 1)
fun BucketApi.uploadToSignedUrlAsFlow(path: String, token: String, file: Path, options: UploadOptionBuilder.() -> Unit = {}): ERROR CLASS: Inconsistent type: kotlinx/coroutines/flow/Flow<io/github/jan/supabase/storage/UploadStatus> (parameters.size = 0, arguments.size = 1)

Uploads a file in BucketApi.bucketId under path using a presigned url

fun BucketApi.uploadToSignedUrlAsFlow(path: String, token: String, uri: Uri, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Uploads a file in BucketApi.bucketId under path using a presigned url

fun BucketApi.uploadToSignedUrlAsFlow(path: String, token: String, data: UploadData, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>
fun BucketApi.uploadToSignedUrlAsFlow(path: String, token: String, data: ByteArray, options: UploadOptionBuilder.() -> Unit = {}): Flow<UploadStatus>

Uploads a file in BucketApi.bucketId under path using a presigned url