Skip to content

[storage] Incorrect mime type inferred when not manually setting metadata #5734

@Lyokone

Description

@Lyokone

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".

Relevant Code:

reference.putFile("file:///data/user/0/io.flutter.plugins.firebasestorageexample/cache/54cd5d7d-1718-4353-a4ce-a87c8c29b28d/dog-puppy-on-garden-royalty-free-image-1586966191.jpg")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions