react-native-blob-util 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ react-native-blob-util version **0.10.16** and up is only compatible with react
|
|
|
27
27
|
- JSON stream supported base on [Oboe.js](https://github.com/jimhigson/oboe.js/) @jimhigson
|
|
28
28
|
|
|
29
29
|
## React Native New Architecture
|
|
30
|
-
With
|
|
30
|
+
With React Native 0.68.0 the switch to enable the new aritechture was introduced.
|
|
31
31
|
Starting with version 0.17.0 this library introduces support for the new architecture as well. Of course the old architecture will still be supproted.
|
|
32
32
|
Further information about it and how to use it you can find here: https://reactnative.dev/docs/next/the-new-architecture/landing-page
|
|
33
33
|
|
|
@@ -92,14 +92,21 @@ After `0.10.3` you can install this package directly from Github
|
|
|
92
92
|
npm install --save github:RonRadtke/react-native-blob-util#<branch_name>
|
|
93
93
|
```
|
|
94
94
|
|
|
95
|
+
**iOS**
|
|
96
|
+
|
|
97
|
+
When using the package from npm, run `pod install` from the `ios` directory:
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
cd ios; pod install; cd ..
|
|
101
|
+
```
|
|
102
|
+
|
|
95
103
|
**Okhttp**
|
|
96
104
|
|
|
97
105
|
For using the library okhttp3 is required. It's in general included in react-native. The library uses the okhttp version shipped with react-native or used by your app. For very old devices android devices okhttp 3.12 can be used.
|
|
98
106
|
|
|
99
107
|
**Manually Link Native Modules**
|
|
100
108
|
|
|
101
|
-
If you're using RN 0.60 or higher,
|
|
102
|
-
|
|
109
|
+
If you're using RN 0.60 or higher, manual linking should not be required anymore.
|
|
103
110
|
|
|
104
111
|
If automatically linking doesn't work for you, see instructions on [manually linking](https://github.com/RonRadtke/react-native-blob-util/wiki/Manually-Link-Package#index).
|
|
105
112
|
|
|
@@ -658,14 +665,14 @@ Android 10 introduced scoped storage and thus new APIs to store files to Documen
|
|
|
658
665
|
|
|
659
666
|
#### CopyToMediaStore
|
|
660
667
|
|
|
661
|
-
Copies an existing file from the internal Storage to the Media Store. <br> An
|
|
668
|
+
Copies an existing file from the internal Storage to the Media Store. <br> An example for downloading a file and storing it to the `downloads` collection
|
|
662
669
|
|
|
663
670
|
```js
|
|
664
671
|
ReactNativeBlobUtil
|
|
665
672
|
.config({
|
|
666
673
|
fileCache: true
|
|
667
674
|
})
|
|
668
|
-
.fetch('GET', 'https://example.de/image.png'
|
|
675
|
+
.fetch('GET', 'https://example.de/image.png')
|
|
669
676
|
.then(async (res) => {
|
|
670
677
|
let result = await ReactNativeBlobUtil.MediaCollection.copyToMediaStore({
|
|
671
678
|
name: filename, // name of the file
|
|
@@ -31,6 +31,7 @@ dispatch_queue_t fsQueue;
|
|
|
31
31
|
|
|
32
32
|
@synthesize filePathPrefix;
|
|
33
33
|
@synthesize documentController;
|
|
34
|
+
@synthesize bridge;
|
|
34
35
|
|
|
35
36
|
- (dispatch_queue_t) methodQueue {
|
|
36
37
|
if(commonTaskQueue == nil)
|
|
@@ -67,7 +68,7 @@ RCT_EXPORT_MODULE();
|
|
|
67
68
|
[[NSFileManager defaultManager] createDirectoryAtPath:[ReactNativeBlobUtilFS getTempPath] withIntermediateDirectories:YES attributes:nil error:NULL];
|
|
68
69
|
}
|
|
69
70
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
70
|
-
eventDispatcherRef =
|
|
71
|
+
eventDispatcherRef = bridge.eventDispatcher;
|
|
71
72
|
[ReactNativeBlobUtilNetwork emitExpiredTasks: eventDispatcherRef];
|
|
72
73
|
});
|
|
73
74
|
|
package/package.json
CHANGED
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
<PlatformToolset>v140</PlatformToolset>
|
|
61
61
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
|
62
62
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
|
63
|
+
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v142</PlatformToolset>
|
|
63
64
|
<CharacterSet>Unicode</CharacterSet>
|
|
64
65
|
<GenerateManifest>false</GenerateManifest>
|
|
65
66
|
</PropertyGroup>
|
|
@@ -177,4 +178,4 @@
|
|
|
177
178
|
<LinkLibraryDependencies>true</LinkLibraryDependencies>
|
|
178
179
|
</ProjectReference>
|
|
179
180
|
</ItemGroup>
|
|
180
|
-
</Project>
|
|
181
|
+
</Project>
|