我怎样才能将图像从Windows Phone 8保存到Firebase服务器? [英] How can I save image from windows phone 8 to firebase server?
问题描述
您可以通过REST API或Firebase库正常存储Firebase中的图片。
你需要做的是base64编码图像,然后用dataURL显示它。您可以在这里看到这种方法的示例:
https://github.com/firebase/firepano
该示例使用FileReader使用readAsDataURL()函数加载图像客户端。
Being an Android app developer, I am new to both Windows phone development and Firebase. I was wondering if I can save an image file (assuming I have the image object) from the windows phone to the firebase database? I am aware that firebase has a REST API so I am guessing I can do it using that. Is this the right method? Any examples? I would appreciate anyone who points me in the right direction.
You can definitely store images in Firebase, both through the REST API, or through the normal Firebase libraries.
What you need to do is base64 encode the image, and then display it with a dataURL. You can see an example of this approach here: https://github.com/firebase/firepano
That example uses a FileReader to load in the image client-side using the readAsDataURL() function.
这篇关于我怎样才能将图像从Windows Phone 8保存到Firebase服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!