我正在使用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)
}
}
有什么想法或建议吗?提前致谢。