我正在开发一个使用 React-native 和 Node.js 作为服务器的应用程序,现在是时候实现个人资料图片了。我正在考虑使用 Microsoft Azure 存储,特别是 Blob 存储服务来保存文件。我知道如何使用Blob存储服务,所以我想将图像发送到服务器,然后从服务器发送到Azure。但是,我认为当我可以从 react native 应用程序发送图像时,我使用了额外的步骤。
有人知道是否可以在react-native中做到这一点吗?我应该如何实现? 或者也许您可以推荐我一种简单的个人资料图片实现方法。
提前致谢!
最佳答案
您可以使用 Azure 存储 JavaScript 客户端库将照片从客户端直接上传到 Azure 存储:https://github.com/Azure/azure-storage-node/tree/master/browser
请参阅此处的示例:https://github.com/Azure/azure-storage-node/blob/master/browser/samples/sample-blob.html
关于node.js - 头像: React Native and Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46038508/