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)

Represents a storage bucket

Link copied to clipboard
sealed interface BucketApi

The api for interacting with a bucket

Link copied to clipboard

A builder for Buckets

Link copied to clipboard

A filter builder for BucketApi.list

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

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

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

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

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
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 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

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

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
suspend fun ResumableClient.createOrContinueUpload(path: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload
suspend fun ResumableClient.createOrContinueUpload(path: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): ResumableUpload

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.

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: <Error class: unknown class>, options: DownloadOptionBuilder.() -> Unit = {})
suspend fun BucketApi.downloadAuthenticatedTo(path: String, file: <Error class: unknown class>, 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: <Error class: unknown class>, options: DownloadOptionBuilder.() -> Unit = {}): Flow<DownloadStatus>
fun BucketApi.downloadAuthenticatedToAsFlow(path: String, file: <Error class: unknown class>, options: DownloadOptionBuilder.() -> Unit = {}): Flow<DownloadStatus>

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: <Error class: unknown class>, options: DownloadOptionBuilder.() -> Unit = {})
suspend fun BucketApi.downloadPublicTo(path: String, file: <Error class: unknown class>, 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: <Error class: unknown class>, options: DownloadOptionBuilder.() -> Unit = {}): Flow<DownloadStatus>
fun BucketApi.downloadPublicToAsFlow(path: String, file: <Error class: unknown class>, options: DownloadOptionBuilder.() -> Unit = {}): Flow<DownloadStatus>

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: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse
suspend fun BucketApi.update(path: String, file: <Error class: unknown class>, 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: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): <Error class: unknown class>
fun BucketApi.updateAsFlow(path: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): <Error class: unknown class>

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: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse
suspend fun BucketApi.upload(path: String, file: <Error class: unknown class>, 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: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): <Error class: unknown class>
fun BucketApi.uploadAsFlow(path: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): <Error class: unknown class>

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: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): FileUploadResponse
suspend fun BucketApi.uploadToSignedUrl(path: String, token: String, file: <Error class: unknown class>, 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: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): <Error class: unknown class>
fun BucketApi.uploadToSignedUrlAsFlow(path: String, token: String, file: <Error class: unknown class>, options: UploadOptionBuilder.() -> Unit = {}): <Error class: unknown class>

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