You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is related to another issue reported to firebase/flutterfire#12363
The issue does not appear when running the same logic on iOS.
[REQUIRED] Step 2: Describe your environment
Android Studio version: 2022.3.1
Firebase Component: Storage
Component version: BoM 32.7.2
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
When uploading a file without any metadata, the metadata are not inferred properly. For instance uploading a jpeg file to the Firebase emulator will give a mime type of "application/octet-stream" instead of "image/jpeg".
Hi @Lyokone, thank you for reaching out. I tried reproducing the issue with the quickstart app, but I did not encounter the issue. I tried photoRef.putFile(fileUri) and photoRef.putFile(fileUri, storageMetadata {}) and the contentType is still intact upon upload.
The putFile() method automatically infers the MIME type from the File extension, but you can override the auto-detected type by specifying contentType in the metadata. If you do not provide a contentType and Cloud Storage cannot infer a default from the file extension, Cloud Storage uses application/octet-stream.See the Use File Metadata section for more information about file metadata.
I suggest try running our quickstart app to help troubleshoot the issue. Let me know if I misunderstood anything.
This issue is related to another issue reported to firebase/flutterfire#12363
The issue does not appear when running the same logic on iOS.
[REQUIRED] Step 2: Describe your environment
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
When uploading a file without any metadata, the metadata are not inferred properly. For instance uploading a jpeg file to the Firebase emulator will give a mime type of "application/octet-stream" instead of "image/jpeg".
Relevant Code:
The text was updated successfully, but these errors were encountered: