New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Couldn't upload a buffer to firebase storage #8103
Comments
|
Hey @EssaadaniYounes. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
The error is when I'm visiting firebase storage and i click on the image to preview it i got no preview available instead of actual image. And yeah it's a node project and the same issue with firebase admin |
Could you try modifying your sharp code to be: const sharped = await sharp(image)
.raw()
.ensureAlpha()
.resize(size.width, size.height, { fit: "inside" })
.jpeg() // Write it in jpeg format https://sharp.pixelplumbing.com/api-output#jpeg
.toBuffer({ resolveWithObject: true }); I have reproduced your error locally, and found the same preview error you encountered. Adding the jpeg() call fixed the issue for me. If you are still having issues viewing the preview, try writing the file to disk with |
Hey @EssaadaniYounes. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically. If you have more information that will help us get to the bottom of this, just add a comment! |
Since there haven't been any recent updates here, I am going to close this issue. @EssaadaniYounes if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this. |
Operating System
Window 10
Browser Version
Chrome
Firebase SDK Version
10.7.2
Firebase SDK Product:
Storage
Describe your project's tooling
ExpressJS with typescript and sharp
Describe the problem
I'm having a task as follow
Steps and code to reproduce issue
#Upload buffer to firebase storage
The text was updated successfully, but these errors were encountered: