🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

rn-fetch-blob

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-fetch-blob - npm Package Compare versions

Comparing version

to
0.10.15

2

package.json
{
"name": "rn-fetch-blob",
"version": "0.10.14",
"version": "0.10.15",
"description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -32,3 +32,2 @@ # New Releases

* [Cancel HTTP request](#user-content-cancel-request)
* [iOS Background Uploading](#user-content-ios-background-uploading)
* [Android Media Scanner, and Download Manager Support](#user-content-android-media-scanner-and-download-manager-support)

@@ -480,30 +479,2 @@ * [Self-Signed SSL Server](#user-content-self-signed-ssl-server)

### iOS Background Uploading
Normally, iOS interrupts network connections when an app is moved to the background, and will throw an error 'Lost connection to background transfer service' when the app resumes. To continue the upload of large files even when the app is in the background, you will need to enable IOSUploadTask options.
First add the following property to your AppDelegate.h:
```
@property (nonatomic, copy) void(^backgroundTransferCompletionHandler)();
```
Then add the following to your AppDelegate.m:
```
- (void)application:(UIApplication *)application
handleEventsForBackgroundURLSession:(NSString *)identifier
completionHandler:(void (^)(void))completionHandler {
self.backgroundTransferCompletionHandler = completionHandler;
}
```
The following example shows how to upload a file in the background:
```js
RNFetchBlob
.config({
IOSBackgroundTask: true, // required for both upload
IOSUploadTask: true, // Use instead of IOSDownloadTask if uploading
uploadFilePath : 'file://' + filePath
})
.fetch('PUT', url, {
'Content-Type': mediaType
}, RNFetchBlob.wrap(filePath));
```
### Android Media Scanner, and Download Manager Support

@@ -510,0 +481,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet