fix: implement uploadBytes for storage modular sdk#9006
fix: implement uploadBytes for storage modular sdk#9006
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request implements the uploadBytes function for the modular storage API, which was previously not implemented. It also adds corresponding E2E and type tests. The implementation wraps uploadBytesResumable in a Promise to provide the non-resumable behavior. Feedback identifies several issues in the implementation: a potential memory leak due to missing unsubscription from the task listener, a risk of hanging promises by throwing instead of rejecting in the default case, and a deviation from Web SDK parity regarding the rejection value for canceled tasks.
82a80e8 to
375bac0
Compare
375bac0 to
734019b
Compare
…teraction Hermes Blob implementation is lacking, and breaks storage uploads done using firebase-js-sdk which expects a full-featured implementation if "Blob" exists on globalThis if you temporarily hide the Blob implementation firebase-js-sdk will fallback to a different data upload method, then binary storage uploads will work So, make a custom binary upload pathway for storage when using firebase-js-sdk and hide Blob in it, but only if platform is not in fact web
824c2b6 to
8eb4ae1
Compare
Description
This PR is fundamentally based on the excellent work from @johnsimeroth here (with CLA signed):
That PR was based on the main branch of his fork and I thought it would be very presumptious to force push to it, so I've opened a new PR off a personal branch here
Related issues
Release Summary
2 "fix" conventional commits, and the first one has the attribution for John correctly preserved
Checklist
AndroidiOSOther(macOS, web)e2etests added or updated inpackages/\*\*/e2ejesttests added or updated inpackages/\*\*/__tests__Test Plan
e2e test and type test, works locally
Think
react-native-firebaseis great? Please consider supporting the project with any of the below:React Native FirebaseandInvertaseon Twitter