FileObjectV2

@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())(source)

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

Parameters

name

The name of the item

id

The id of the item

version

The version of the item

bucketId

The bucket id of the item

updatedAt

The last update date of the item

createdAt

The creation date of the item

lastAccessedAt

The last access date of the item

metadata

The metadata of the item

size

The size of the item

rawContentType

The content type of the item

etag

The etag of the item

lastModified

The last modified date of the item

cacheControl

The cache control of the item

serializer

The serializer to use for decoding the metadata

Constructors

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

Properties

Link copied to clipboard
@SerialName(value = "bucket_id")
val bucketId: String? = null
Link copied to clipboard
@SerialName(value = "cache_control")
val cacheControl: String? = null
Link copied to clipboard
val contentType: ContentType

The content type of the file

Link copied to clipboard
@SerialName(value = "created_at")
val createdAt: Instant
Link copied to clipboard
val etag: String? = null
Link copied to clipboard
val id: String?
Link copied to clipboard
@SerialName(value = "last_accessed_at")
val lastAccessedAt: Instant? = null
Link copied to clipboard
@SerialName(value = "last_modified")
val lastModified: Instant? = null
Link copied to clipboard
val metadata: JsonObject? = null
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "content_type")
val rawContentType: String
Link copied to clipboard
val size: Long
Link copied to clipboard
@SerialName(value = "updated_at")
val updatedAt: Instant? = null
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T> decodeMetadata(): T?

Decodes the metadata using the serializer