supabase-community / supabase-kt

A Kotlin Multiplatform Client for Supabase.
https://supabase.com/docs/reference/kotlin/introduction
MIT License
421 stars 38 forks source link

Add support for file metadata, `info` and `exists` #694

Open jan-tennert opened 3 months ago

jan-tennert commented 3 months ago

What kind of change does this PR introduce?

Feature

What is the new behavior?

Support for the new user metadata and the new exists and info methods.

client.storage["my-bucket"].upload("file.png", data) {
    userMetadata {
        put("key", "value")
    }
    //Or:
    userMetadata(myCustomObject)
}

Additionally, the Storage plugin now also provides the ability to set a custom serializer.

Additional context

See https://github.com/supabase/storage-js/pull/207/