Parcourir la source

Update README.md

wkh237 il y a 8 ans
Parent
révision
908f2cd000
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10
    1
      README.md

+ 10
- 1
README.md Voir le fichier

@@ -36,6 +36,7 @@ A project committed to make file acess and data transfer easier, efficient for R
36 36
 * [Web API Polyfills](#user-content-web-api-polyfills)
37 37
 * [Performance Tips](#user-content-performance-tips)
38 38
 * [API References](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API)
39
+* [Caveats](#user-content-caveats)
39 40
 * [Trouble Shooting](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting)
40 41
 * [Development](#user-content-development)
41 42
 
@@ -737,7 +738,7 @@ Here's a [sample app](https://github.com/wkh237/rn-firebase-storage-upload-sampl
737 738
 
738 739
 ## Performance Tips
739 740
 
740
-**Read Stream Event Overhead**
741
+**Read Stream and Progress Event Overhead**
741 742
 
742 743
 When reading data via `fs.readStream` the process seems blocking JS thread when file is large, it's because the default buffer size is quite small (4kb) which result in large amount of events triggered in JS thread, try to increase the buffer size (for example 100kb = 102400) and set a larger interval (which is introduced in 0.9.4 default value is 10ms) to limit the frequency. 
743 744
 
@@ -759,6 +760,14 @@ If you're going to concatenate files, you don't have to read the data to JS cont
759 760
 
760 761
 <img src="img/performance_f2f.png" style="width : 100%"/>
761 762
 
763
+## Caveats
764
+
765
+* This library does not urlencode unicode characters in URL automatically, see [#146](https://github.com/wkh237/react-native-fetch-blob/issues/146). 
766
+* When a `Blob` is created from existing file, the file **WILL BE REMOVE** if you `close` the blob.
767
+* If you replaced `window.XMLHttpRequest` for some reason (e.g. make Firebase SDK work), it will also effect how official `fetch` works (basically it should work just fine).
768
+* When file stream and upload/download progress event slow down your app, consider 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.
769
+* When passing a file path to the library, remove `file://` prefix.
770
+
762 771
 ## Changes
763 772
 
764 773
 See [release notes](https://github.com/wkh237/react-native-fetch-blob/releases)