Sfoglia il codice sorgente

Update README to reflect new package name

Travis Nuttall 5 anni fa
parent
commit
34176c54ba
1 ha cambiato i file con 56 aggiunte e 52 eliminazioni
  1. 56
    52
      README.md

+ 56
- 52
README.md Vedi File

@@ -1,5 +1,9 @@
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)]()
1
+# New Releases
2
+In order to publish new releases from this fork, we have renamed this project to
3
+`rn-fetch-blob` and published to `https://www.npmjs.com/package/rn-fetch-blob`.
4
+
5
+# rn-fetch-blob
6
+[![release](https://img.shields.io/github/release/joltup/rn-fetch-blob.svg?style=flat-square)](https://github.com/joltup/rn-fetch-blob/releases) [![npm](https://img.shields.io/npm/v/rn-fetch-blob.svg?style=flat-square)](https://www.npmjs.com/package/rn-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/joltup/rn-fetch-blob/wiki) [![npm](https://img.shields.io/npm/l/rn-fetch-blob.svg?maxAge=2592000&style=flat-square)]()
3 7
 
4 8
 
5 9
 A project committed to making file access and data transfer easier and more efficient for React Native developers.
@@ -13,7 +17,7 @@ A project committed to making file access and data transfer easier and more effi
13 17
 - Blob, File, XMLHttpRequest polyfills that make browser-based library available in RN (experimental)
14 18
 - JSON stream supported base on [Oboe.js](https://github.com/jimhigson/oboe.js/) @jimhigson
15 19
 
16
-## TOC (visit [Wiki](https://github.com/wkh237/react-native-fetch-blob/wiki) to get the complete documentation)
20
+## TOC (visit [Wiki](https://github.com/joltup/rn-fetch-blob/wiki) to get the complete documentation)
17 21
 * [About](#user-content-about)
18 22
 * [Installation](#user-content-installation)
19 23
 * [HTTP Data Transfer](#user-content-http-data-transfer)
@@ -33,7 +37,7 @@ A project committed to making file access and data transfer easier and more effi
33 37
  * [Manage cached files](#user-content-cache-file-management)
34 38
 * [Web API Polyfills](#user-content-web-api-polyfills)
35 39
 * [Performance Tips](#user-content-performance-tips)
36
-* [API References](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API)
40
+* [API References](https://github.com/joltup/rn-fetch-blob/wiki/Fetch-API)
37 41
 * [Caveats](#user-content-caveats)
38 42
 * [Development](#user-content-development)
39 43
 
@@ -43,7 +47,7 @@ This project was started in the cause of solving issue [facebook/react-native#85
43 47
 
44 48
 It is committed to making file access and transfer easier and more efficient for React Native developers. We've implemented highly customizable filesystem and network module which plays well together. For example, developers can upload and download data directly from/to storage, which is more efficient, especially for large files. The file system supports file stream, so you don't have to worry about OOM problem when accessing large files.
45 49
 
46
-In `0.8.0` we introduced experimental Web API polyfills that make it possible to use browser-based libraries in React Native, such as, [FireBase JS SDK](https://github.com/wkh237/rn-firebase-storage-upload-sample)
50
+In `0.8.0` we introduced experimental Web API polyfills that make it possible to use browser-based libraries in React Native, such as, [FireBase JS SDK](https://github.com/joltup/rn-firebase-storage-upload-sample)
47 51
 
48 52
 
49 53
 ## Installation
@@ -51,26 +55,26 @@ In `0.8.0` we introduced experimental Web API polyfills that make it possible to
51 55
 Install package from npm
52 56
 
53 57
 ```sh
54
-npm install --save react-native-fetch-blob
58
+npm install --save rn-fetch-blob
55 59
 ```
56 60
 
57 61
 Or if using CocoaPods, add the pod to your `Podfile`
58 62
 
59 63
 ```
60
-pod 'react-native-fetch-blob',
61
-    :path => '../node_modules/react-native-fetch-blob'
64
+pod 'rn-fetch-blob',
65
+    :path => '../node_modules/rn-fetch-blob'
62 66
 ```
63 67
 
64
-After `0.10.3` you can install this package directly from Github 
68
+After `0.10.3` you can install this package directly from Github
65 69
 
66 70
 ```sh
67 71
 # replace <branch_name> with any one of the branches
68
-npm install --save github:wkh237/react-native-fetch-blob-package#<branch_name>
72
+npm install --save github:joltup/rn-fetch-blob-package#<branch_name>
69 73
 ```
70 74
 
71 75
 **Manually Link Native Modules**
72 76
 
73
-If automatically linking doesn't work for you, see instructions on [manually linking](https://github.com/joltup/react-native-fetch-blob/wiki/Manually-Link-Package#index).
77
+If automatically linking doesn't work for you, see instructions on [manually linking](https://github.com/joltup/rn-fetch-blob/wiki/Manually-Link-Package#index).
74 78
 
75 79
 **Automatically Link Native Modules**
76 80
 
@@ -98,7 +102,7 @@ pre 0.29 projects
98 102
 RNFB_ANDROID_PERMISSIONS=true rnpm link
99 103
 ```
100 104
 
101
-The link script might not take effect if you have non-default project structure, please visit [the wiki](https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package) to link the package manually.
105
+The link script might not take effect if you have non-default project structure, please visit [the wiki](https://github.com/joltup/rn-fetch-blob/wiki/Manually-Link-Package) to link the package manually.
102 106
 
103 107
 **Grant Permission to External storage for Android 5.0 or lower**
104 108
 
@@ -142,15 +146,15 @@ ES6
142 146
 The module uses ES6 style export statement, simply use `import` to load the module.
143 147
 
144 148
 ```js
145
-import RNFetchBlob from 'react-native-fetch-blob'
149
+import RNFetchBlob from 'rn-fetch-blob'
146 150
 ```
147 151
 
148 152
 ES5
149 153
 
150
-If you're using ES5 require statement to load the module, please add `default`. See [here](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting#rnfetchblobfetch-is-not-a-function) for more detail.
154
+If you're using ES5 require statement to load the module, please add `default`. See [here](https://github.com/joltup/rn-fetch-blob/wiki/Trouble-Shooting#rnfetchblobfetch-is-not-a-function) for more detail.
151 155
 
152 156
 ```
153
-var RNFetchBlob = require('react-native-fetch-blob').default
157
+var RNFetchBlob = require('rn-fetch-blob').default
154 158
 ```
155 159
 
156 160
 ## HTTP Data Transfer
@@ -158,7 +162,7 @@ var RNFetchBlob = require('react-native-fetch-blob').default
158 162
 
159 163
 ### Regular Request
160 164
 
161
-After `0.8.0` react-native-fetch-blob automatically decides how to send the body by checking its type and `Content-Type` in the header. The rule is described in the following diagram
165
+After `0.8.0` rn-fetch-blob automatically decides how to send the body by checking its type and `Content-Type` in the header. The rule is described in the following diagram
162 166
 
163 167
 <img src="img/RNFB-Flow-hd.png" style="width : 90%" />
164 168
 
@@ -251,7 +255,7 @@ RNFetchBlob
251 255
 
252 256
 **Use Specific File Path**
253 257
 
254
-If you prefer a particular file path rather than randomly generated one, you can use `path` option. We've added [several  constants](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#dirs) in v0.5.0 which represents commonly used directories.
258
+If you prefer a particular file path rather than randomly generated one, you can use `path` option. We've added [several  constants](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#dirs) in v0.5.0 which represents commonly used directories.
255 259
 
256 260
 ```js
257 261
 let dirs = RNFetchBlob.fs.dirs
@@ -273,7 +277,7 @@ RNFetchBlob
273 277
 
274 278
 ####  Upload example : Dropbox [files-upload](https://www.dropbox.com/developers/documentation/http/documentation#files-upload) API
275 279
 
276
-`react-native-fetch-blob` will convert the base64 string in `body` to binary format using native API, this process is done in a separated thread so that it won't block your GUI.
280
+`rn-fetch-blob` will convert the base64 string in `body` to binary format using native API, this process is done in a separated thread so that it won't block your GUI.
277 281
 
278 282
 ```js
279 283
 
@@ -356,7 +360,7 @@ Elements have property `filename` will be transformed into binary format, otherw
356 360
   })
357 361
 ```
358 362
 
359
-What if you want to append a file to form data? Just like [upload a file from storage](#user-content-upload-a-file-from-storage) example, wrap `data` by `wrap` API (this feature is only available for `version >= v0.5.0`). On version >= `0.6.2`, it is possible to set custom MIME type when appending a file to form data. But keep in mind when the file is large it's likely to crash your app. Please consider use other strategy (see [#94](https://github.com/wkh237/react-native-fetch-blob/issues/94)).
363
+What if you want to append a file to form data? Just like [upload a file from storage](#user-content-upload-a-file-from-storage) example, wrap `data` by `wrap` API (this feature is only available for `version >= v0.5.0`). On version >= `0.6.2`, it is possible to set custom MIME type when appending a file to form data. But keep in mind when the file is large it's likely to crash your app. Please consider use other strategy (see [#94](https://github.com/joltup/rn-fetch-blob/issues/94)).
360 364
 
361 365
 ```js
362 366
 
@@ -467,7 +471,7 @@ task.cancel((err) => { ... })
467 471
 
468 472
 If you have existing code that uses `whatwg-fetch`(the official **fetch**), it's not necessary to replace them with `RNFetchblob.fetch`, you can simply use our **Fetch Replacement**. The difference between Official them is official fetch uses [whatwg-fetch](https://github.com/github/fetch) which wraps XMLHttpRequest polyfill under the hood. It's a great library for web developers, but does not play very well with RN. Our implementation is simply a wrapper of our `fetch` and `fs` APIs, so you can access all the features we provided.
469 473
 
470
-[See document and examples](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetch-replacement)
474
+[See document and examples](https://github.com/joltup/rn-fetch-blob/wiki/Fetch-API#fetch-replacement)
471 475
 
472 476
 ### Android Media Scanner, and Download Manager Support
473 477
 
@@ -524,7 +528,7 @@ RNFetchBlob
524 528
     })
525 529
 ```
526 530
 
527
-Your app might not have right to remove/change the file created by Download Manager, therefore you might need to [set custom location to the download task](https://github.com/wkh237/react-native-fetch-blob/issues/236).
531
+Your app might not have right to remove/change the file created by Download Manager, therefore you might need to [set custom location to the download task](https://github.com/joltup/rn-fetch-blob/issues/236).
528 532
 
529 533
 **Download Notification and Visibility in Download App (Android Only)**
530 534
 
@@ -592,31 +596,31 @@ Or show an image in image viewer
592 596
 
593 597
 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, everyone who uses this module may need these APIs for their cases.
594 598
 
595
-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.
599
+Before start using file APIs, we recommend read [Differences between File Source](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#differences-between-file-source) first.
596 600
 
597 601
 File Access APIs
598
-- [asset (0.6.2)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#assetfilenamestringstring)
599
-- [dirs](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#dirs)
600
-- [createFile](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#createfilepath-data-encodingpromise)
601
-- [writeFile (0.6.0)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#writefilepathstring-contentstring--array-encodingstring-appendbooleanpromise)
602
-- [appendFile (0.6.0) ](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#appendfilepathstring-contentstring--arraynumber-encodingstring-promisenumber)
603
-- [readFile (0.6.0)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#readfilepath-encodingpromise)
604
-- [readStream](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#readstreampath-encoding-buffersize-interval-promisernfbreadstream)
605
-- [hash (0.10.9)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#hashpath-algorithm-promise)
606
-- [writeStream](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#writestreampathstring-encodingstringpromise)
607
-- [hash](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#hashpath-algorithmpromise)
608
-- [unlink](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#unlinkpathstringpromise)
609
-- [mkdir](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#mkdirpathstringpromise)
610
-- [ls](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#lspathstringpromise)
611
-- [mv](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#mvfromstring-tostringpromise)
612
-- [cp](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#cpsrcstring-deststringpromise)
613
-- [exists](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#existspathstringpromise)
614
-- [isDir](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#isdirpathstringpromise)
615
-- [stat](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#statpathstringpromise)
616
-- [lstat](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#lstatpathstringpromise)
617
-- [scanFile (Android only)](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API#scanfilepathstringpromise-androi-only)
618
-
619
-See [File API](https://github.com/wkh237/react-native-fetch-blob/wiki/File-System-Access-API) for more information
602
+- [asset (0.6.2)](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#assetfilenamestringstring)
603
+- [dirs](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#dirs)
604
+- [createFile](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#createfilepath-data-encodingpromise)
605
+- [writeFile (0.6.0)](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#writefilepathstring-contentstring--array-encodingstring-appendbooleanpromise)
606
+- [appendFile (0.6.0) ](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#appendfilepathstring-contentstring--arraynumber-encodingstring-promisenumber)
607
+- [readFile (0.6.0)](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#readfilepath-encodingpromise)
608
+- [readStream](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#readstreampath-encoding-buffersize-interval-promisernfbreadstream)
609
+- [hash (0.10.9)](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#hashpath-algorithm-promise)
610
+- [writeStream](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#writestreampathstring-encodingstringpromise)
611
+- [hash](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#hashpath-algorithmpromise)
612
+- [unlink](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#unlinkpathstringpromise)
613
+- [mkdir](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#mkdirpathstringpromise)
614
+- [ls](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#lspathstringpromise)
615
+- [mv](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#mvfromstring-tostringpromise)
616
+- [cp](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#cpsrcstring-deststringpromise)
617
+- [exists](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#existspathstringpromise)
618
+- [isDir](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#isdirpathstringpromise)
619
+- [stat](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#statpathstringpromise)
620
+- [lstat](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#lstatpathstringpromise)
621
+- [scanFile (Android only)](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API#scanfilepathstringpromise-androi-only)
622
+
623
+See [File API](https://github.com/joltup/rn-fetch-blob/wiki/File-System-Access-API) for more information
620 624
 
621 625
 ### File Stream
622 626
 
@@ -780,7 +784,7 @@ RNFetchBlob.fetch('POST', 'http://example.com/upload', { 'Transfer-Encoding' : '
780 784
 
781 785
 ### Self-Signed SSL Server
782 786
 
783
-By default, react-native-fetch-blob does NOT allow connection to unknown certification provider since it's dangerous. To connect a server with self-signed certification, you need to add `trusty` to `config` explicitly. This function is available for version >= `0.5.3`
787
+By default, rn-fetch-blob does NOT allow connection to unknown certification provider since it's dangerous. To connect a server with self-signed certification, you need to add `trusty` to `config` explicitly. This function is available for version >= `0.5.3`
784 788
 
785 789
 ```js
786 790
 RNFetchBlob.config({
@@ -794,12 +798,12 @@ RNFetchBlob.config({
794 798
 
795 799
 ## Web API Polyfills
796 800
 
797
-After `0.8.0` we've made some [Web API polyfills](https://github.com/wkh237/react-native-fetch-blob/wiki/Web-API-Polyfills-(experimental)) that makes some browser-based library available in RN.
801
+After `0.8.0` we've made some [Web API polyfills](https://github.com/joltup/rn-fetch-blob/wiki/Web-API-Polyfills-(experimental)) that makes some browser-based library available in RN.
798 802
 
799 803
 - Blob
800 804
 - XMLHttpRequest (Use our implementation if you're going to use it with Blob)
801 805
 
802
-Here's a [sample app](https://github.com/wkh237/rn-firebase-storage-upload-sample) that uses polyfills to upload files to FireBase.
806
+Here's a [sample app](https://github.com/joltup/rn-firebase-storage-upload-sample) that uses polyfills to upload files to FireBase.
803 807
 
804 808
 ## Performance Tips
805 809
 
@@ -830,16 +834,16 @@ If you're going to concatenate files, you don't have to read the data to JS cont
830 834
 * This library does not urlencode unicode characters in URL automatically, see [#146](https://github.com/wkh237/react-native-fetch-blob/issues/146).
831 835
 * When you create a `Blob` ,  from an existing file, the file **WILL BE REMOVED** if you `close` the blob.
832 836
 * If you replaced `window.XMLHttpRequest` for some reason (e.g. make Firebase SDK work), it will also affect how official `fetch` works (basically it should work just fine).
833
-* When file stream and upload/download progress event slow down your app, consider an upgrade to `0.9.6+`, use [additional arguments](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetchprogressconfig-eventlistenerpromisernfetchblobresponse) to limit its frequency.
837
+* When file stream and upload/download progress event slow down your app, consider an upgrade to `0.9.6+`, use [additional arguments](https://github.com/joltup/rn-fetch-blob/wiki/Fetch-API#fetchprogressconfig-eventlistenerpromisernfetchblobresponse) to limit its frequency.
834 838
 * When passing a file path to the library, remove `file://` prefix.
835 839
 
836
-when you got a problem, have a look at [Trouble Shooting](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting) or [issues labeled Trouble Shooting](https://github.com/wkh237/react-native-fetch-blob/issues?utf8=✓&q=label:%22trouble%20shooting%22%20), there'd be some helpful information.
840
+when you got a problem, have a look at [Trouble Shooting](https://github.com/joltup/rn-fetch-blob/wiki/Trouble-Shooting) or [issues labeled Trouble Shooting](https://github.com/joltup/rn-fetch-blob/issues?utf8=✓&q=label:%22trouble%20shooting%22%20), there'd be some helpful information.
837 841
 
838 842
 ## Changes
839 843
 
840
-See [release notes](https://github.com/wkh237/react-native-fetch-blob/releases)
844
+See [release notes](https://github.com/joltup/rn-fetch-blob/releases)
841 845
 
842 846
 ### Development
843 847
 
844
-If you're interested in hacking this module, check our [development guide](https://github.com/wkh237/react-native-fetch-blob/wiki/Home), there might be some helpful information.
845
-Please feel free to make a PR or file an issue.
848
+If you're interested in hacking this module, check our [development guide](https://github.com/joltup/rn-fetch-blob/wiki/Home), there might be some helpful information.
849
+Please feel free to make a PR or file an issue.