Socket
Socket
Sign inDemoInstall

rn-fetch-blob

Package Overview
Dependencies
12
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.14 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc