Upload image to firebase storage

Hello, we are trying to upload an image to firebase (user profile picture) but we were unable to make it work. Appgyver keeps showing errors that all of the file uploads had failed. We need to pick an item from the gallery and upload it to Firebase storage.

Any help will be much appreciated.

Thank you

1 Like

Também estou tendo o mesmo erro, pelo visto é algum bug no componente, achei que era eu que estava fazendo algo errado. Já conseguiu resolver?

Follow this tutorial. Let me know if you need help. Its a bit tricky to upload files.

2 Likes

@Juliano_Alvarenga @Zach_Duffy

Hi there,

we managed to solve this. Problem is that if you are trying to upload the image via the Firebase upload node. In properties there are 6 outputs mentioned, however you only need 4 to upload (name/size/path/downloadURL(formula)) and that works.

Happy coding.

1 Like

Poderia enviar o exemplo?

I had to use upload files instead. Good to know the flow function works!

I use File Upload
[SET_KEY( pageVars.photo , ‘uploadUrl’, ‘https://firebasestorage.googleapis.com/v0/b/yourproject-numnu.appspot.com/o/img’ + GENERATE_UUID())]

3 Likes

Exactly what I use :slight_smile:

For me, it works like I described above. Here’s how the upload pipeline looks like.upload_img

I´m struggling with this too. Same error as you mention.

Can you show the settings you used on the Firebase Storage Upload node?

I have a "take Photo node feeding into a Firebase Upload node. On the upload node I have set each of the variables set to “Output of another node”, then name, path, file size and and Mime manually set to image/jpeg.

Any help gratefully received.

Hi AppGyver team,
Many of us have the same problem with the flow function “Firebase Storage Upload files” 1.2.7
Could you please describe more precisely the expected input structure in the documentation?

Please help us, many thanks,
Martial

He Martial,

if you still wondering, how to upload an image, please, use the flow I have posted earlier. For that you need appVar that will be an object with 4 properties (these are returned by “Pick image from library”) even though there is more of them described. You can always try to debug this via alerts.

For image update we are using direct HTTP PATCH as PATCH method is not available via AppGyver composer directly.

I think appgyver should go to code blocks like sketchware. I am having a really hard time learning how to do anything that should be very simple.

so are you saying to create a list of objects variable with 4 properties, e.g., name/size/path/downloadURL??

how do we attach the outputs of the pick image form library node to the values of the appVar in order to pass them to upload firebase storage?

why is downloadUrl needed to upload files? Don’t we have to wait for the files to upload for it to return the download url?

what needs to be the value of the downloadUrl when we set the variable after pick image node?

Please share the properties of the node “Upload to File Storage” to see how you set them. Thank you.