How do you save a file to a Firebase Hosting folder location for images through android?

前端 未结 1 330
灰色年华
灰色年华 2020-12-22 05:05

I\'m really new to Firebase and am studying how to implement it right now. I was thinking that it has functions similar to Parse where a ParseFile object can be created that

相关标签:
1条回答
  • Firebase Hosting is a service for hosting static assets, typically the HTML/CSS/images of a web site. You cannot programmatically add files to Firebase Hosting.

    The Firebase Database allows you to store JSON data. While binary data is not a type that is supported in JSON, it is possible to encode the binary data in say base64 and thus store the image in a (large) string. See Can I store image files in firebase using Java API? Note that while this is possible, it is not recommended for anything but small images or as a curiosity to see that it can be done.

    Your best option is typically to store the images on a 3rd party image storage service.

    0 讨论(0)
提交回复
热议问题