-
Notifications
You must be signed in to change notification settings - Fork 1.6k
[IOS] Firebase Storage: Invalid argument in put
at index 0: Expected Blob or File.
#69
Comments
Hi @cherniv , do you have a sample code of how you use it ? I've tried the sample app and it works fine. (Though there's a little misleading in content-type). From the log you provided
I think it failed at this line, perhaps the image does not exist at the given path, you can try to create Blob using BASE64 encoded string and see if that works or make sure the file exists. |
My code looks like this:
It doesnt work on both iOS simulator and device |
@cherniv , I've tried your code and it works on my environment (both iphone and simulator), I've create a branch that contains sample code which is based on your code. Please try if that works, thank you ! |
I realised now that it starts working after adding of these two lines:
but when i'm doing this, the |
Because our XMLHttpRequest replaced original one and RN fetch uses whatwg-fetch which is based on XMLHttpRequest. It is possible to fix this problem but I need to do some tests. An alternative way is use the 'fetch' provided by our module, it's not based on XMLHttpRequest. |
Hi there, thanks for creating this awesome project! I'm still having problems with fetch on 0.9.1.
|
@kdedakia , thanks for reporting this issue. I'll look into it and update status in #106. Besides, have you tried Fetch Replacement ? This is a fetch implementation based on our native network module rather than XMLHttpRequest polyfill 😄 |
Thanks, that completely fixed my issues! |
I tried to use Fetch Replacement, but my fetch are breaking, not even silently failed as before :
Edit : console.log(fetch) gives me {} as a result.... |
@mlumbroso , thanks for reporting. Please feel free file an issue if something went wrong 😄 |
First of all, thanks for all of your work, you are doing a great job!
I'm trying to upload a blob to firebase by using the https://github.com/wkh237/rn-firebase-storage-upload-sample and dcworldwide' example here: #44
but no matter what i'm doing i'm getting this kind of error:
I also tried to provide it with base64 static string , and it seems like blob is created , but Firebase doesnt like it or doesn't understand that it is Blob object..
I have:
The text was updated successfully, but these errors were encountered: