Browse Source

Merge branch 'master' into 0.7.0

Ben Hsieh 8 years ago
parent
commit
b54df3bbf6
4 changed files with 31 additions and 8 deletions
  1. 1
    0
      .gitignore
  2. 28
    7
      README.md
  3. 1
    1
      src/package.json
  4. 1
    0
      test-server/.gitignore

+ 1
- 0
.gitignore View File

1
+.imdone
1
 testconfig
2
 testconfig
2
 RNFetchBlobTest/
3
 RNFetchBlobTest/
3
 test/test-server/public/*
4
 test/test-server/public/*

+ 28
- 7
README.md View File

1
-# react-native-fetch-blob [![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) [![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000&style=flat-square)]() [![npm](https://img.shields.io/badge/inProgress-0.7.0-yellow.svg?style=flat-square)](https://github.com/wkh237/react-native-fetch-blob/milestones)
1
+# react-native-fetch-blob ![release](https://img.shields.io/github/release/wkh237/react-native-fetch-blob.svg?maxAge=86400&style=flat-square) [![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) [![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000&style=flat-square)]() [![npm](https://img.shields.io/badge/inProgress-0.7.0-yellow.svg?style=flat-square)](https://github.com/wkh237/react-native-fetch-blob/milestones)
2
 
2
 
3
 A module provides upload, download, and files access API. Supports file stream read/write for process large files.
3
 A module provides upload, download, and files access API. Supports file stream read/write for process large files.
4
 
4
 
44
 rnpm link
44
 rnpm link
45
 ```
45
 ```
46
 
46
 
47
+### For React Native >= 0.29
48
+
49
+The Android application template has changed in [react-native@0.29](https://github.com/facebook/react-native/releases/tag/v0.29.0) our rnpm link script may not working properly, if you encounters some error, please follow these instructions, Thanks @dphov, also see related issue  [#51](https://github.com/wkh237/react-native-fetch-blob/issues/51)
50
+
51
+Add this code to `MainApplication.java`
52
+
53
+```diff
54
+...
55
++ import com.RNFetchBlob.RNFetchBlobPackage;                                                                                 
56
+...
57
+protected List<ReactPackage> getPackages() {
58
+      return Arrays.<ReactPackage>asList(
59
+          new MainReactPackage(),
60
++          new RNFetchBlobPackage()                                                                                         
61
+      );
62
+    }
63
+  };
64
+...
65
+```
66
+
47
 **Grant Permission to External storage for Android 5.0 or lower**
67
 **Grant Permission to External storage for Android 5.0 or lower**
48
 
68
 
49
-Mechanism about granting Android permissions has slightly different since Android 6.0 released, please refer to [Officail Document](https://developer.android.com/training/permissions/requesting.html).
69
+Mechanism about granting Android permissions has slightly different since Android 6.0 released, please refer to [Official Document](https://developer.android.com/training/permissions/requesting.html).
50
 
70
 
51
-If you're going to access external storage (say, SD card storage) for `Android 5.0` (or lower) devices, you might have to add the following line to `AndroidManifetst.xml`.
71
+If you're going to access external storage (say, SD card storage) for `Android 5.0` (or lower) devices, you might have to add the following line to `AndroidManifest.xml`.
52
 
72
 
53
 ```diff
73
 ```diff
54
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
74
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
110
 
130
 
111
 #### Download to storage directly
131
 #### Download to storage directly
112
 
132
 
113
-The simplest way is give a `fileCach` option to config, and set it to `true`. This will let the incoming response data stored in a temporary path **wihout** any file extension.
133
+The simplest way is give a `fileCache` option to config, and set it to `true`. This will let the incoming response data stored in a temporary path **without** any file extension.
114
 
134
 
115
 **These files won't be removed automatically, please refer to [Cache File Management](#user-content-cache-file-management)**
135
 **These files won't be removed automatically, please refer to [Cache File Management](#user-content-cache-file-management)**
116
 
136
 
149
     console.log('The file saved to ', res.path())
169
     console.log('The file saved to ', res.path())
150
     // Beware that when using a file path as Image source on Android,
170
     // Beware that when using a file path as Image source on Android,
151
     // you must prepend "file://"" before the file path
171
     // you must prepend "file://"" before the file path
152
-    imageView = <Image source={{ uri : Platform.OS === 'android' ? 'file://' : '' + res.path() }}/>
172
+    imageView = <Image source={{ uri : Platform.OS === 'android' ? 'file://' + res.path()  : '' + res.path() }}/>
153
   })
173
   })
154
 ```
174
 ```
155
 
175
 
297
 
317
 
298
 #### Upload/Download progress
318
 #### Upload/Download progress
299
 
319
 
300
-In `version >= 0.4.2` it is possible to know the upload/download progress. On Anroid, only download progress is supported. See [wiki](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetchprogresseventlistenerpromisernfetchblobresponse) for more information.
320
+In `version >= 0.4.2` it is possible to know the upload/download progress. On Android, only download progress is supported. See [wiki](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetchprogresseventlistenerpromisernfetchblobresponse) for more information.
301
 
321
 
302
 ```js
322
 ```js
303
   RNFetchBlob.fetch('POST', 'http://www.example.com/upload', {
323
   RNFetchBlob.fetch('POST', 'http://www.example.com/upload', {
401
 
421
 
402
 File access APIs were made when developing `v0.5.0`, which helping us write tests, and was not planned to be a part of this module. However we realized that, it's hard to find a great solution to manage cached files, every one who use this moudle may need these APIs for there cases.
422
 File access APIs were made when developing `v0.5.0`, which helping us write tests, and was not planned to be a part of this module. However we realized that, it's hard to find a great solution to manage cached files, every one who use this moudle may need these APIs for there cases.
403
 
423
 
404
-Before get started using file APIs we recommend read [Differences between File Source](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#differences-between-file-source) first.
424
+Before start using file APIs, we recommend read [Differences between File Source](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#differences-between-file-source) first.
405
 
425
 
406
 File Access APIs
426
 File Access APIs
407
 - [asset (0.6.2)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#assetfilenamestringstring)
427
 - [asset (0.6.2)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#assetfilenamestringstring)
549
 
569
 
550
 | Version | |
570
 | Version | |
551
 |---|---|
571
 |---|---|
572
+| 0.6.3 | Fix performance issue on IOS, increase max concurrent request limitation from 1. |
552
 | 0.6.2 | Add support of asset file and camera roll files, Support custom MIME type when sending multipart request, thanks @smartt |
573
 | 0.6.2 | Add support of asset file and camera roll files, Support custom MIME type when sending multipart request, thanks @smartt |
553
 | 0.6.1 | Fix #37 progress report API issue on IOS |
574
 | 0.6.1 | Fix #37 progress report API issue on IOS |
554
 | 0.6.0 | Add readFile and writeFile API for easier file access, also added Android download manager support. |
575
 | 0.6.0 | Add readFile and writeFile API for easier file access, also added Android download manager support. |

+ 1
- 1
src/package.json View File

1
 {
1
 {
2
   "name": "react-native-fetch-blob",
2
   "name": "react-native-fetch-blob",
3
-  "version": "0.6.3-dev.1",
3
+  "version": "0.6.3",
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": {

+ 1
- 0
test-server/.gitignore View File

8
 !public/beethoven.mp3
8
 !public/beethoven.mp3
9
 !public/cat-fu.mp4
9
 !public/cat-fu.mp4
10
 !uploads/readme
10
 !uploads/readme
11
+.imdone