[英]Converting raw file into actual file in react-native
我有一个从服务器获取的原始文件,例如:
file: {
fileName:xyz,
size:7125,
mimeType:document/pdf
}
我如何将其转换为普通文件并将其保存到受尊重的目录中。 谢谢你。
您已下载该文件并将其存储在您的手机 memory 中,对于下载,您有以下选项。
使用那个库。
https://github.com/joltup/rn-fetch-blob#download-to-storage-directly
在浏览器中打开该链接browser and download it through the browser
如果您使用的是expo
您可以这样做
https://docs.expo.io/versions/latest/sdk/filesystem/#example-usage
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.