[firebase_storage] Fix Content-Type auto-detection for Android#1834
[firebase_storage] Fix Content-Type auto-detection for Android#1834collinjackson merged 5 commits intoflutter:masterfrom long1eu:content_type_autodetection
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.
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?