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

Commit 908f2cd

Browse files
authored
Update README.md
1 parent b98143d commit 908f2cd

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ A project committed to make file acess and data transfer easier, efficient for R
3636
* [Web API Polyfills](#user-content-web-api-polyfills)
3737
* [Performance Tips](#user-content-performance-tips)
3838
* [API References](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API)
39+
* [Caveats](#user-content-caveats)
3940
* [Trouble Shooting](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting)
4041
* [Development](#user-content-development)
4142

@@ -737,7 +738,7 @@ Here's a [sample app](https://github.com/wkh237/rn-firebase-storage-upload-sampl
737738

738739
## Performance Tips
739740

740-
**Read Stream Event Overhead**
741+
**Read Stream and Progress Event Overhead**
741742

742743
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.
743744

@@ -759,6 +760,14 @@ If you're going to concatenate files, you don't have to read the data to JS cont
759760

760761
<img src="img/performance_f2f.png" style="width : 100%"/>
761762

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+
762771
## Changes
763772

764773
See [release notes](https://github.com/wkh237/react-native-fetch-blob/releases)

0 commit comments

Comments
 (0)