0.2.7 • Published 4 months ago

react-native-chunked-dl v0.2.7

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

react-native-chunked-dl

Chunked download for react-native

Installation

npm install react-native-chunked-dl

Usage

import { download, stopDownload } from 'react-native-chunked-dl';

// ...

const {
    jobId,
    promise
} = download({
    url: 'https://google.com',
    toFile: FS.DocumentDirectoryPath + '/playback.m4a',
    contentLength: 3548166,
    chunkSize: 1024 * 1024 * 10,
    headers: {
        'Content-Type': 'application/text',
    }
});

promise.then((result) => {
    console.log(result.statusCode)
}).catch((err) => {
    console.log(err)
});

setTimeout(() => {
    stopDownload(jobId)
}, 1000)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.2.7

4 months ago

0.2.6

10 months ago

0.2.5

10 months ago

0.2.4

10 months ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.9

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago