如何从API中下载react Native中的API文件

发布于 2025-02-11 06:55:02 字数 379 浏览 2 评论 0原文

我在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 headerenter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

-小熊_ 2025-02-18 06:55:02

you can use this lib https://github.com/RonRadtke/react-native-blob-util to download any file including images

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文