Browse Source

bump to 0.10.0-beta.2

Ben Hsieh 8 years ago
parent
commit
2b23235332
3 changed files with 28 additions and 7 deletions
  1. 24
    3
      src/README.md
  2. 2
    2
      src/package.json
  3. 2
    2
      src/react-native-fetch-blob.podspec

+ 24
- 3
src/README.md View File

1
 # react-native-fetch-blob
1
 # react-native-fetch-blob
2
 [![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)]()
2
 [![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)]()
3
 
3
 
4
-
5
 A project committed to make file acess and data transfer easier, efficient for React Native developers.
4
 A project committed to make file acess and data transfer easier, efficient for React Native developers.
6
 
5
 
7
-# [Please visit our Github Page for latest document](https://github.com/wkh237/react-native-fetch-blob)
8
-
9
 ## Features
6
 ## Features
10
 - Transfer data directly from/to storage without BASE64 bridging
7
 - Transfer data directly from/to storage without BASE64 bridging
11
 - File API supports normal files, Asset files, and CameraRoll files
8
 - File API supports normal files, Asset files, and CameraRoll files
403
     })
400
     })
404
 ```
401
 ```
405
 
402
 
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
+
406
 ### Cancel Request
427
 ### Cancel Request
407
 
428
 
408
 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.
429
 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.

+ 2
- 2
src/package.json View File

1
 {
1
 {
2
   "name": "react-native-fetch-blob",
2
   "name": "react-native-fetch-blob",
3
-  "version": "0.10.0-beta.1",
3
+  "version": "0.10.0-beta.2",
4
   "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
4
   "description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
5
   "main": "index.js",
5
   "main": "index.js",
6
   "scripts": {
6
   "scripts": {
47
     "smartt <github@eriksmartt.com>",
47
     "smartt <github@eriksmartt.com>",
48
     ""
48
     ""
49
   ]
49
   ]
50
-}
50
+}

+ 2
- 2
src/react-native-fetch-blob.podspec View File

1
 Pod::Spec.new do |s|
1
 Pod::Spec.new do |s|
2
   s.name             = "react-native-fetch-blob"
2
   s.name             = "react-native-fetch-blob"
3
-  s.version          = "0.10.0-beta.1"
3
+  s.version          = "0.10.0-beta.2"
4
   s.summary          = "A project committed to make file acess and data transfer easier, effiecient for React Native developers."
4
   s.summary          = "A project committed to make file acess and data transfer easier, effiecient for React Native developers."
5
   s.requires_arc = true
5
   s.requires_arc = true
6
   s.license      = 'MIT'
6
   s.license      = 'MIT'
7
   s.homepage     = 'n/a'
7
   s.homepage     = 'n/a'
8
   s.authors      = { "wkh237" => "xeiyan@gmail.com" }
8
   s.authors      = { "wkh237" => "xeiyan@gmail.com" }
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'}
10
   s.source_files = 'ios/**/*.{h,m}'
10
   s.source_files = 'ios/**/*.{h,m}'
11
   s.platform     = :ios, "7.0"
11
   s.platform     = :ios, "7.0"
12
   s.dependency 'React/Core'
12
   s.dependency 'React/Core'