UploadOptionBuilder

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

Builder for uploading files with additional options

Parameters

serializer

The serializer to use for encoding the metadata

upsert

Whether to update the file if it already exists

userMetadata

The user metadata to upload with the file

contentType

The content type of the file. If null, the content type will be inferred from the file extension

Constructors

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

Properties

Link copied to clipboard
var contentType: ContentType?
Link copied to clipboard
Link copied to clipboard
var userMetadata: JsonObject?

Functions

Link copied to clipboard
fun httpOverride(override: HttpRequestOverride)

Adds an HttpRequestOverride to the upload request

Link copied to clipboard
inline fun <T : Any> userMetadata(data: T)
inline fun userMetadata(builder: JsonObjectBuilder.() -> Unit)

Sets the user metadata to upload with the file