-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use MIMEType for image download extension if not present in resource URL #6591
Conversation
Recommend adding so that we can be creative about extension (without forcing the user to explicitly set in the URL provided, as it might be provided in storage metadata)
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
@chliangGoogle I could move some of this logic to another function to add tests, let me know what your preference would be. Thanks! |
@akivab Thanks for the issue and PR! Routing to @chliangGoogle for review. |
EDIT: Was able to get tests to work using the Simulator target instead of Mac thanks to Paul's comment below. Original comment: Attaching the diff so that it might serve as an example of the tests I'm planning to add (but that I didn't want to add due to the concern of being unable to run locally) This is the git diff between what is in this PR and what I have suggested for tests. Thanks so much! |
It might be easier to test on iOS than Catalyst. You can generate an iOS dev environment with:
|
Thanks so much @paulb777 -- I've updated my PR with some simple unit tests. @chliangGoogle open to any feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Thank you for doing this!
Thanks @chliangGoogle, addressed comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one last nit bit.
Can you also update the changelog in FirebaseMessaging/CHANGELOG?
#unreleased
[fixed] Fixed the issue that failed to download image if no extension but MIME type is set. (#6590)
- [fixed] Fix issue :3
Thanks @chliangGoogle -- added to the CHANGELOG.md and calling teardown on the mock now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, my wording is bad, I corrected mine again.
Thank you very much doing this. I will approve this when it's okay to merge master. Our team is doing maintenance work at the moment. Once it's cleared, I will approve and you can merge to master.
Perfect, sounds good. Contributing here has been a great experience, hoping to do more in the future. |
Hi @chliangGoogle, I don't have write access to this repo so expecting that you might be able to merge in. Thanks so much. |
I'll merge it now - to make sure that none of the upcoming major changes introduce a conflict. Thanks for the PR @akivab ! |
Recommend adding so that we can be creative about extension (without forcing the user to explicitly set in the URL provided, as it might be provided in storage metadata)
Addresses the following issue
#6590