|
|
|
|
10
|
|
10
|
|
11
|
This module was designed to be a substitution of `Blob`, there's a set of APIs including basic file system CRUD method, and file stream reader/writer. Also it has a special `fetch` implementation that supports binary request/response body.
|
11
|
This module was designed to be a substitution of `Blob`, there's a set of APIs including basic file system CRUD method, and file stream reader/writer. Also it has a special `fetch` implementation that supports binary request/response body.
|
12
|
|
12
|
|
13
|
-**Pre v0.5.0 Users**
|
|
|
|
|
13
|
+**Backward Compatible**
|
14
|
|
14
|
|
15
|
-All updates are `backward-compatible` generally you don't have to change existing code unless you're going to use new APIs. In latest version (v0.5.0), new APIs can either `upload` or `download` files simply using a file path. It's much more memory efficent in some use case. We've also introduced `fs` APIs for access files, and `file stream` API that helps you read/write files (especially for **large ones**), see [Examples](#user-content-usage) bellow. This module implements native methods, supports both Android (uses awesome native library [AsyncHttpClient](https://github.com/AsyncHttpClient/async-http-client])) and IOS.
|
|
|
|
|
15
|
+All updates are `backward-compatible` generally you don't have to change existing code unless you're going to use new APIs. But we recommend pre `0.5.0` users consider upgrade the package to latest version, since we have introduced new APIs can either `upload` or `download` files simply using a file path. It's much more memory efficent in some use case. We've also introduced `fs` APIs for access files, and `file stream` API that helps you read/write files (especially for **large ones**), see [Examples](#user-content-usage) bellow. This module implements native methods, supports both Android (uses awesome native library [AsyncHttpClient](https://github.com/AsyncHttpClient/async-http-client])) and IOS.
|
16
|
|
16
|
|
17
|
## TOC
|
17
|
## TOC
|
18
|
|
18
|
|
19
|
* [Installation](#user-content-installation)
|
19
|
* [Installation](#user-content-installation)
|
20
|
-* [Guide](#user-content-guide)
|
|
|
|
|
20
|
+* [Recipes](#user-content-guide)
|
21
|
* [Download file](#user-content-download-example--fetch-files-that-needs-authorization-token)
|
21
|
* [Download file](#user-content-download-example--fetch-files-that-needs-authorization-token)
|
22
|
* [Upload file](#user-content-upload-example--dropbox-files-upload-api)
|
22
|
* [Upload file](#user-content-upload-example--dropbox-files-upload-api)
|
23
|
* [Multipart/form upload](#user-content-multipartform-data-example--post-form-data-with-file-and-data)
|
23
|
* [Multipart/form upload](#user-content-multipartform-data-example--post-form-data-with-file-and-data)
|
|
|
|
|
79
|
|
79
|
|
80
|
Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. So adding permissions in `AndroidManifest.xml` won't work in Android 6.0 devices. To grant permissions in runtime, you might use modules like [react-native-android-permissions](https://github.com/lucasferreira/react-native-android-permissions).
|
80
|
Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. So adding permissions in `AndroidManifest.xml` won't work in Android 6.0 devices. To grant permissions in runtime, you might use modules like [react-native-android-permissions](https://github.com/lucasferreira/react-native-android-permissions).
|
81
|
|
81
|
|
82
|
-## Guide
|
|
|
|
|
82
|
+## Recipes
|
83
|
|
83
|
|
84
|
```js
|
84
|
```js
|
85
|
import RNFetchBlob from 'react-native-fetch-blob'
|
85
|
import RNFetchBlob from 'react-native-fetch-blob'
|