Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Commit 2b23235

Browse files
committed
bump to 0.10.0-beta.2
1 parent 10c625c commit 2b23235

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

src/README.md

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
# react-native-fetch-blob
22
[![release](https://img.shields.io/github/release/wkh237/react-native-fetch-blob.svg?style=flat-square)](https://github.com/wkh237/react-native-fetch-blob/releases) [![npm](https://img.shields.io/npm/v/react-native-fetch-blob.svg?style=flat-square)](https://www.npmjs.com/package/react-native-fetch-blob) ![](https://img.shields.io/badge/PR-Welcome-brightgreen.svg?style=flat-square) [![](https://img.shields.io/badge/Wiki-Public-brightgreen.svg?style=flat-square)](https://github.com/wkh237/react-native-fetch-blob/wiki) [![npm](https://img.shields.io/npm/l/react-native-fetch-blob.svg?maxAge=2592000&style=flat-square)]()
33

4-
54
A project committed to make file acess and data transfer easier, efficient for React Native developers.
65

7-
# [Please visit our Github Page for latest document](https://github.com/wkh237/react-native-fetch-blob)
8-
96
## Features
107
- Transfer data directly from/to storage without BASE64 bridging
118
- File API supports normal files, Asset files, and CameraRoll files
@@ -403,6 +400,30 @@ In `version >= 0.4.2` it is possible to know the upload/download progress. After
403400
})
404401
```
405402

403+
In `0.9.6`, you can specify an optional first argument which contains `count` and `interval` to limit progress event frequency (this will be done in native context in order to reduce RCT bridge overhead). Notice that `count` argument will not work if the server does not provide response content length.
404+
405+
406+
```js
407+
RNFetchBlob.fetch('POST', 'http://www.example.com/upload', {
408+
... some headers,
409+
'Content-Type' : 'octet-stream'
410+
}, base64DataString)
411+
// listen to upload progress event, emit every 250ms
412+
.uploadProgress({ interval : 250 },(written, total) => {
413+
console.log('uploaded', written / total)
414+
})
415+
// listen to download progress event, every 10%
416+
.progress({ count : 10 }, (received, total) => {
417+
console.log('progress', received / total)
418+
})
419+
.then((resp) => {
420+
// ...
421+
})
422+
.catch((err) => {
423+
// ...
424+
})
425+
```
426+
406427
### Cancel Request
407428

408429
After `0.7.0` it is possible to cancel a HTTP request. When the request cancel, it will definately throws an promise rejection, be sure to catch it.

src/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-fetch-blob",
3-
"version": "0.10.0-beta.1",
3+
"version": "0.10.0-beta.2",
44
"description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
55
"main": "index.js",
66
"scripts": {
@@ -47,4 +47,4 @@
4747
"smartt <[email protected]>",
4848
""
4949
]
50-
}
50+
}

src/react-native-fetch-blob.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Pod::Spec.new do |s|
22
s.name = "react-native-fetch-blob"
3-
s.version = "0.10.0-beta.1"
3+
s.version = "0.10.0-beta.2"
44
s.summary = "A project committed to make file acess and data transfer easier, effiecient for React Native developers."
55
s.requires_arc = true
66
s.license = 'MIT'
77
s.homepage = 'n/a'
88
s.authors = { "wkh237" => "[email protected]" }
9-
s.source = { :git => "https://github.com/wkh237/react-native-fetch-blob", :tag => 'v0.10.0-beta.1'}
9+
s.source = { :git => "https://github.com/wkh237/react-native-fetch-blob", :tag => 'v0.10.0-beta.2'}
1010
s.source_files = 'ios/**/*.{h,m}'
1111
s.platform = :ios, "7.0"
1212
s.dependency 'React/Core'

0 commit comments

Comments
 (0)