8000 fix(storage): do not set metadata property unless it has a value by russellwheatley · Pull Request #12805 · firebase/flutterfire · GitHub
[go: up one dir, main page]

Skip to content

Conversation

russellwheatley
Copy link
Member
@russellwheatley russellwheatley commented May 20, 2024

Description

This fixes a bug where if we set one property on SettableMetadata (e.g. customMetadata), it would also set every other metadata property to null. This was stopping contentType from being inferred for android at least.

Unfortunately, the emulator doesn't infer contentType, so I tested on a live project and it is now inferring type if SettableMetadata is used without setting contentType.

Related Issues

fixes #12801

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@russellwheatley russellwheatley changed the title fix(storage, android): do not set metadata property unless it has a value fix(storage): do not set metadata property unless it has a value May 20, 2024
@russellwheatley russellwheatley marked this pull request as ready for review May 21, 2024 13:27
@russellwheatley russellwheatley merged commit 978a87d into master May 22, 2024
@russellwheatley russellwheatley deleted the storage-12801 branch May 22, 2024 12:15
@firebase firebase locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FIREBASE_STORAGE] mime/contentType undefined after upploading files to firebase storage if settableMetadata is NOT null
3 participants
0