【发布时间】:2017-02-28 11:01:01
【问题描述】:
我正在使用 react-native-fetch-blob 实现下载 PDF 文件。但我有一个错误“找不到变量:已收到”
onPDFPressed(){
RNFetchBlob
.config({
notification: true,
path: 'downloads/pdf_test.pdf',
indicator: true,
overwrite: true,
addAndroidDownloads: {
path: RNFetchBlob.fs.dirs.SDCardDir +'/downloads/pdf_test.pdf',
useDownloadManager: true,
notification: true,
overwrite: true,
description: 'downloading content...',
mime: 'application/pdf',
mediaScannable: false
}
})
.fetch('GET', 'http://www.pdf995.com/samples/pdf.pdf')
.progress(received, total)
{
console.log('progress', received / total)
}
}
有什么想法或建议吗?提前致谢。
【问题讨论】:
标签: react-native react-native-fetch-blob