You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
Hi ! Thank you for reporting an issue, but we would like to remind you, we have a trouble shooting page in our wiki. You may want to take a look on that page :p
1
+
Hi ! Thank you for reporting an issue, but we would like to remind you, we have a trouble shooting page in our wiki. You may want to take a look on that page or find issues tagged "trouble shooting" :p
2
2
3
3
* please provide the version of installed library and RN project.
4
4
* a sample code snippet/repository is very helpful to spotting the problem.
Copy file name to clipboardExpand all lines: README.md
+20-7Lines changed: 20 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,17 @@
4
4
5
5
A project committed to make file acess and data transfer easier, efficient for React Native developers.
6
6
7
-
> The npm package is inside `src` folder, if you're going to install using github repository do not point to here directly
7
+
> If you're going to use github repo as npm dependency please use the [archive repository](https://github.com/wkh237/react-native-fetch-blob-package/releases/tag/v0.9.6).
8
+
9
+
> If you're using this library as Firebase Storage solution, please upgrade to 0.9.6 since XMLHttpRequest polyfill has way better compatibility than previous versions.
8
10
9
11
## Features
10
12
- Transfer data directly from/to storage without BASE64 bridging
11
13
- File API supports normal files, Asset files, and CameraRoll files
12
14
- Native-to-native file manipulation API, reduce JS bridging performance loss
13
15
- File stream support for dealing with large file
14
16
- Blob, File, XMLHttpRequest polyfills that make browser-based library available in RN (experimental)
17
+
- JSON stream supported base on [Oboe.js@jimhigson](https://github.com/jimhigson/oboe.js/)
15
18
16
19
## TOC
17
20
*[About](#user-content-about)
@@ -34,7 +37,7 @@ A project committed to make file acess and data transfer easier, efficient for R
34
37
*[Web API Polyfills](#user-content-web-api-polyfills)
@@ -403,7 +406,7 @@ In `version >= 0.4.2` it is possible to know the upload/download progress. After
403
406
})
404
407
```
405
408
406
-
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.
409
+
In `0.9.6`, you can specify an object as first argument which contains `count` and `interval`, to the frequency of progress event (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.
407
410
408
411
409
412
```js
@@ -429,7 +432,7 @@ In `0.9.6`, you can specify an optional first argument which contains `count` an
429
432
430
433
### Cancel Request
431
434
432
-
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.
435
+
After `0.7.0` it is possible to cancel an HTTP request. When the request is cancelled, it will throw a promise rejection, be sure to catch it.
433
436
434
437
```js
435
438
let task =RNFetchBlob.fetch('GET', 'http://example.com/file/1')
@@ -735,7 +738,7 @@ Here's a [sample app](https://github.com/wkh237/rn-firebase-storage-upload-sampl
735
738
736
739
## Performance Tips
737
740
738
-
**Read Stream Event Overhead**
741
+
**Read Stream and Progress Event Overhead**
739
742
740
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.
741
744
@@ -757,6 +760,16 @@ If you're going to concatenate files, you don't have to read the data to JS cont
* 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
+
771
+
when you got 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%3A%22trouble%20shooting%22%20), there'd be some helpful information.
772
+
760
773
## Changes
761
774
762
775
See [release notes](https://github.com/wkh237/react-native-fetch-blob/releases)
0 commit comments