Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

[IOS] Firebase Storage: Invalid argument in put at index 0: Expected Blob or File. #69

Closed
@cherniv

Description

@cherniv

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:

Blob verbose: Blob constructor called mime image/png;BASE64 type string length 177
log.js:24 Blob verbose: create Blob cache file from file path RNFetchBlob-file:///var/mobile/Containers/Data/Application/7EC98D41-B3AC-47…ts/RNFetchBlob_tmp/RNFetchBlobTmp_f48f64c8-f627-497a-b10b-6cc72f5cf540.png
log.js:24 Blob verbose: register blob onCreated 0
log.js:24 Blob verbose: invoke create event
log.js:36 Blob error: RNFetchBlob could not create Blob : /var/mobile/Containers/Data/Application/7EC98D41-B3AC-4714-AD90-DAEC405B57F5/Documents/RNFetchBlob_tmp/RNFetchBlobTmp_f48f64c8-f627-497a-b10b-6cc72f5cf540.png v {code: "storage/invalid-argument", message: "Firebase Storage: Invalid argument in put at index 0: Expected Blob or File.", serverResponse: null, name: "FirebaseError"}

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:

"firebase": "^3.2.1",
"react-native": "^0.30.0",
"react-native-fetch-blob": "^0.8.0",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions