Retrieving json file from Firebase Storage


Retrieving json file from Firebase Storage



I would like to be able to get a json file from Firebase Storage to work with. I don't need to push it back.



Does Firebase Storage can give me that and if so, how can I do it with Angular?



If not, does the Firebase database is a better choice?



I already downloaded firebase and angularfire2.



I tried getDownloadURL and getMetadata, but don't know how to get the info inside.



Thanks for your help!




1 Answer
1



I'd suggest you use the realtime database, I suspect that it will be simpler for you to pick up. The realtime database already stores all of it's information as JSON, so you could simply query the database and get your JSON data... but if you used the Storage portion of Firebase then you'd have to jump through some hoops to actually read the file you get and parse out the data.



Check out this documentation for examples of how to query the realtime database using Angularfire.





hi @JeremyW. I think I will go with your solution. Any idea if I could just upload my json to firebase database? I could not find any places. Thanks
– David
2 days ago





@David Yep! When you're looking at the RealTime Database, look in the top right corner. You should see a plus sign, a minus sign, and 3 dots. Click the 3 dots and you'll get a dropdown... choose the import JSON option.
– JeremyW
2 days ago


import JSON





Oh! I was using the Cloud Firestore and not the Real-Time database. you are right, that one has that option! Thanks.
– David
yesterday






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

paramiko-expect timeout is happening after executing the command

Export result set on Dbeaver to CSV

Opening a url is failing in Swift