-
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
Storage - new 'putFile' method implementation breaks old code #10353
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
@alexmomotiuk - thank you for looking into this issue and reporting it. I have merged the PR and the fix should be in the next release. In the meantime, if you initialize the metadata before passing it to the |
@maneesht how do we fix this issue while we wait for the next release? |
@jtressle don't pass metadata, or roll back to a previous version of firebase |
@alexmomotiuk I require the metadata so I ended up using the putData method you mentioned. |
@jtressle - if you fill the metadata with the proper path and name properties before you pass it to |
@maneesht can you provide an example? I'm getting the error
Thanks. |
@jtressle - I was mistaken. |
it is possible to make an NSMutableDictionary (alloc + init it), put a "name" entry in there that is the full path, then do initWithDictionary on the FIRStorageMetadata. The name gets copied to path and it all works. Of course that is internal stuff and a workaround and not supported and you accept responsibility etc ;-) just thought I would mention it |
Thanks, @mikehardy! |
Description
The new implementation of 'putFile' method, breaks old code.
If I pass StorageMetadata object with set up 'contentType' to this method, I get crash with error
because 'path' and 'name' won't be set for metadata object from parameters.
'putData' method has different implementation and works well.
Reproducing the issue
No response
Firebase SDK Version
10
Xcode Version
14.0.1
Installation Method
CocoaPods
Firebase Product(s)
Storage
Targeted Platforms
iOS
Relevant Log Output
No response
If using Swift Package Manager, the project's Package.resolved
No response
If using CocoaPods, the project's Podfile.lock
No response
The text was updated successfully, but these errors were encountered: