Merge pull request #38 from AlexanderNuar/mini-pr

mini readme fix
This commit is contained in:
Kesha Antonov
2024-01-02 20:34:41 +03:00
committed by GitHub
+2 -2
View File
@@ -100,14 +100,14 @@ Failing to add this code will result in canceled background downloads. If Xcode
```javascript
import { Platform } from 'react-native'
import { download, completeHandler } from '@kesha-antonov/react-native-background-downloader'
import { download, completeHandler, directories } from '@kesha-antonov/react-native-background-downloader'
const jobId = 'file123'
let task = download({
id: jobId,
url: 'https://link-to-very.large/file.zip',
destination: `${RNBackgroundDownloader.directories.documents}/file.zip`,
destination: `${directories.documents}/file.zip`,
metadata: {}
}).begin(({ expectedBytes, headers }) => {
console.log(`Going to download ${expectedBytes} bytes!`)