New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-fetch-blob

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-fetch-blob - npm Package Compare versions

Comparing version 0.10.6 to 0.10.7

6

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

@@ -11,3 +11,3 @@ "main": "index.js",

"base-64": "0.1.0",
"glob": "^7.0.6"
"glob": "7.0.6"
},

@@ -39,2 +39,2 @@ "keywords": [

]
}
}

@@ -133,2 +133,4 @@ // Copyright 2016 wkh237@github. All rights reserved.

log.verbose('create Blob cache file from file path', data)
// set this flag so that we know this blob is a wrapper of an existing file
this._isReference = true
this._ref = String(data).replace('RNFetchBlob-file://', '')

@@ -286,2 +288,16 @@ let orgPath = this._ref

safeClose() {
if(this._closed)
return Promise.reject('Blob has been released.)
this._closed = true
if(!this._isReference) {
return fs.unlink(this._ref).catch((err) => {
console.warn(err)
})
}
else {
return Promise.resolve()
}
}
_invokeOnCreateEvent() {

@@ -288,0 +304,0 @@ log.verbose('invoke create event', this._onCreated)

@@ -280,3 +280,3 @@ // Copyright 2016 wkh237@github. All rights reserved.

this.responseURL = this._url
if(e.state === "2") {
if(e.state === "2" && e.taskId === this._task.taskId) {
this._responseHeaders = e.headers

@@ -283,0 +283,0 @@ this._statusText = e.status

@@ -29,3 +29,3 @@ # react-native-fetch-blob

* [Transfer Encoding](#user-content-transfer-encoding)
* [RNFetchBlob as Fetch](#user-content-rnfetchblob-as-fetch)
* [Drop-in Fetch Replacement](#user-content-drop-in-fetch-replacement)
* [File System](#user-content-file-system)

@@ -36,3 +36,3 @@ * [File access](#user-content-file-access)

* [Web API Polyfills](#user-content-web-api-polyfills)
* [Performance Tips](#user-content-performance-tipsd)
* [Performance Tips](#user-content-performance-tips)
* [API References](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API)

@@ -457,7 +457,7 @@ * [Caveats](#user-content-caveats)

### RNFetchBlob as Fetch
### Drop-in Fetch Replacement
0.9.0
If you have existing code that uses `whatwg-fetch`(the official **fetch**), you don't have to change them after 0.9.0, just use fetch replacement. The difference between Official fetch and fetch replacement is, official fetch uses [whatwg-fetch](https://github.com/github/fetch) js library which wraps XMLHttpRequest polyfill under the hood it's a great library for web developers, however that does not play very well with RN. Our implementation is simply a wrapper of RNFetchBlob.fetch and fs APIs, so you can access all the features we provide.
If you have existing code that uses `whatwg-fetch`(the official **fetch**), it's not necessary to replace them with `RNFetchblob.fetch`, you can simply use our **Fetch Replacement**. The difference between Official them is official fetch uses [whatwg-fetch](https://github.com/github/fetch) which wraps XMLHttpRequest polyfill under the hood. It's a great library for web developers, but does not play very well with RN. Our implementation is simply a wrapper of our `fetch` and `fs` APIs, so you can access all the features we provided.

@@ -619,2 +619,4 @@ [See document and examples](https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetch-replacement)

> The file stream event has a default throttle(10ms) and buffer size which preventing it cause too much overhead to main thread, yo can also [tweak these values](#user-content-performance-tips).
```js

@@ -621,0 +623,0 @@ let data = ''

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc