如何从API中下载react Native中的API文件
我在API的响应中获得了类似文件的图像,然后我需要在移动存储中下载该图像,但是当我研究时,我找不到下载文件的方法,当您拥有时,可以下载图像可下载的URL,但我没有。任何人都可以帮助解决该“数据”:{“ _data”:{“ __collector”:[object],“ blobid”:“ A3432F49-13A1-4E2B-873D-A4DCE3B71191” }}这是响应,如果我使用响应型:我的API标题
I am getting the file-like image in the response of the API then I need to download that image in mobile storage but when I was researching I didn't find the way to download a file there is the way's to download images when you have downloadable URL but I don't have that. can anyone help with that "data": {"_data": {"__collector": [Object],"blobId": "a3432f49-13a1-4e2b-873d-a4dce3b71191","offset": 0,"size": 142788}} this is the response if i am using responseType: 'blob' in my api header
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用此lib https://github.com/rronradtke/rronradtke/react-native-native-native-blob -util 下载任何文件包括图像
you can use this lib https://github.com/RonRadtke/react-native-blob-util to download any file including images