question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uploading a .png image with .putData() creates an octet-stream object instead of a png object in storage emulator

See original GitHub issue

[REQUIRED] Environment info

firebase-tools: 11.9.0

Platform: Windows 10

[REQUIRED] Steps to reproduce

  1. Create an app that has access to the emulator.
  2. Convert a png image to bytes
  3. Upload the data with .putData(data, SettableMetadata(contentType: 'image/png'));
  4. Check the result in storage emulator

[REQUIRED] Expected behavior

As in version 11.7.0, I expected to have a image/png object added to the storage emulator.

[REQUIRED] Actual behavior

Instead it adds a application/octet-stream.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Yuangwangcommented, Nov 7, 2022

Thanks! this will help in debugging

0reactions
Yuangwangcommented, Nov 10, 2022

Merged in fix for admin sdk issue https://github.com/firebase/firebase-tools/pull/5229 it should be out with the new release. I also followed the steps to reproduce the original bug and it seems to be fixed so I’m closing this for now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase storage file type is 'octet-stream' instead of 'png/jpg'
When I upload them to the storage, I see them with a type: application/octet-stream instead of image/jpeg or image/png .
Read more >
Why is my file type "application/octet-stream" when I upload ...
I upload an image using uploadBytes(). Before I download the image, I update the metadata of an image to "images/jpeg". Metadata is updated...
Read more >
Adding a Create File event action - IBM
Select the object in the editor window and double-click the event that you want to trigger the jump from the Events view. The...
Read more >
16. Uploading Files / Images to Blob Storage (ASP.NET Core ...
Source Code: Start: https://github.com/bhushan-mulmule/ProjectOrion/tree/chapter15 End: ...
Read more >
Document Management (DocMan) - IFS Community
DOCMAN - Upload .png/.jpg file to IFS Cloud. 10 months ago ... HTTP/1.1' with RAW data being passed as binary format of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found