-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for file metadata, info
and exists
#694
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketApiImpl.kt
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketApiImpl.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketApiImpl.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketItem.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketItem.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketItem.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketItem.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileOptionBuilder.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileOptionBuilder.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileOptionBuilder.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileOptionBuilder.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileObject.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileObject.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileObject.kt
Fixed
Show fixed
Hide fixed
Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileObject.kt
Fixed
Show fixed
Hide fixed
return storage.api.postJson("object/list/$bucketId", buildJsonObject { | ||
put("prefix", prefix) | ||
putJsonObject(BucketListFilter().apply(filter).build()) | ||
}).safeBody() | ||
} | ||
|
||
override suspend fun info(path: String): FileObjectV2 { | ||
val response = storage.api.get("object/info/$bucketId/$path") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, lets wait a bit for adding the info
method as there is a bug in the JS lib, this should be object/info/public
, but there is also a object/info/authenticated
.
We're figuring out internally on how we're naming methods.
So lets just wait a bit before merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, I commented on the JS PR regarding this. I couldn't make this work on the hosted Supabase instance, but the self-hosted Docker one works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@grdsdev Any news regarding this?
# Conflicts: # Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketApi.kt # Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/BucketApiImpl.kt # Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FileObject.kt # Storage/src/commonMain/kotlin/io/github/jan/supabase/storage/FlowExt.kt # Storage/src/commonTest/kotlin/BucketApiTest.kt
@@ -13,6 +18,7 @@ | |||
class UploadOptionBuilder( | |||
@PublishedApi internal val serializer: SupabaseSerializer, | |||
var upsert: Boolean = false, | |||
var userMetadata: JsonObject? = null, |
Check warning
Code scanning / detekt
Public properties require documentation. Warning
What kind of change does this PR introduce?
Feature
What is the new behavior?
Support for the new user metadata and the new
exists
andinfo
methods.Additionally, the
Storage
plugin now also provides the ability to set a custom serializer.Additional context
See supabase/storage-js#207