-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[firebase_storage] Fix Content-Type auto-detection for Android #1834
[firebase_storage] Fix Content-Type auto-detection for Android #1834
Conversation
|
A new issue that I found was related to the leading Since documentation for both Android and iOS show https://firebase.google.com/docs/storage/android/create-reference#reference_properties |
|
The Android Firebase SDK uses the ContentResolver#getType method to get the MIME type as you can see here. The issue is that |
|
Another approach, would be to get the Content-Type ourselves and set it on metadata if the user didn't set it already. This approach is also used by the Firebase Storage iOS SDK. |
collinjackson
left a comment
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.
Thanks! You've fixed two inconsistencies between iOS and Android with this PR, and the Android integration test now passes.
Description
Fix auto-detection of Content-Type for Android.
Related Issues
flutter/flutter#32181
Checklist
///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?