capawesome-team / capacitor-firebase

⚡️ Firebase plugins for Capacitor. Supports Android, iOS and the Web.
https://capawesome.io/plugins/firebase/
Apache License 2.0
367 stars 90 forks source link

feat(storage): get custom metadata #664

Closed mamillastre closed 1 day ago

mamillastre commented 2 days ago

Plugin(s)

Current problem

We can not get the custom metadata of a Cloud Storage file.

Preferred solution

We can add the capability to get them. getMetadata() should return the "customMetadata" attribute.

Alternative options

No response

Additional context

Web: https://firebase.google.com/docs/storage/web/file-metadata#custom_metadata Android: https://firebase.google.com/docs/storage/android/file-metadata#custom_metadata iOS: https://firebase.google.com/docs/storage/ios/file-metadata#custom_metadata

Before submitting

robingenz commented 2 days ago

The plugin already provides the getMetadata(...) and updateMetadata(...) methods. What else is missing?

mamillastre commented 2 days ago

Sorry, updateMetadata() already support the customMetadata. I didn't see that. But "getMetadata()" does not return this value.

robingenz commented 2 days ago

Would you be willing to create a PR?

mamillastre commented 2 days ago

Yes, I will create a PR 👍