【发布时间】:2018-05-16 11:04:59
【问题描述】:
我正在使用“react-native-fetch-blob”版本 0.10.8 下载 react-native 中的文件。这对android按预期工作。我能够按预期下载文件。至于ios,我无法下载文件。
下面是我正在使用的代码。
downloadFinalBlog() {
const { config, fs } = RNFetchBlob;
let PictureDir = fs.dirs.PictureDir;
let options = {
fileCache: true,
addAndroidDownloads: {
useDownloadManager: true,
notification: false,
title: "Great ! Download Success ! :",
mime: "application/pdf",
description: "Final Blog"
}
};
config(options)
.fetch("GET", "http://www.example.com/example.pdf")
.then(res => {
console.log(res);
}).catch((error) => {
console.log(error);
});
}
谁能建议我有没有其他方法可以在 IOS 中以 react native 下载文件。
【问题讨论】:
标签: react-native download