react-native-blob-util 0.22.0 → 0.22.2
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/.eslintrc.js +56 -56
- package/LICENSE +21 -21
- package/Migration.md +41 -41
- package/NuGet.config +11 -11
- package/README.md +1109 -1104
- package/android/gradle.properties +1 -1
- package/android/src/main/AndroidManifest.xml +37 -37
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilConfig.java +57 -57
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilConst.java +20 -20
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilFileTransformer.java +9 -9
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilImpl.java +431 -431
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilProgressConfig.java +39 -39
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilReq.java +1014 -1014
- package/android/src/main/java/com/ReactNativeBlobUtil/Response/ReactNativeBlobUtilDefaultResp.java +98 -98
- package/android/src/main/java/com/ReactNativeBlobUtil/Response/ReactNativeBlobUtilFileResp.java +166 -166
- package/android/src/main/java/com/ReactNativeBlobUtil/Utils/FileDescription.java +19 -19
- package/android/src/main/java/com/ReactNativeBlobUtil/Utils/FileProvider.java +4 -4
- package/android/src/main/java/com/ReactNativeBlobUtil/Utils/MimeType.java +70 -70
- package/android/src/main/java/com/ReactNativeBlobUtil/Utils/PathResolver.java +223 -223
- package/android/src/main/java/com/ReactNativeBlobUtil/Utils/Tls12SocketFactory.java +68 -68
- package/android/src/main/res/values/strings.xml +3 -3
- package/android/src/main/res/xml/provider_paths.xml +12 -12
- package/android.js +58 -58
- package/class/ReactNativeBlobUtilCanceledFetchError.js +9 -9
- package/class/ReactNativeBlobUtilFile.js +5 -5
- package/class/ReactNativeBlobUtilReadStream.js +84 -84
- package/class/ReactNativeBlobUtilSession.js +68 -68
- package/class/ReactNativeBlobUtilWriteStream.js +50 -50
- package/class/StatefulPromise.js +7 -7
- package/codegenSpecs/NativeBlobUtils.js +86 -86
- package/components/Fetch.onPress.js +10 -10
- package/components/Fetch.when.js +15 -15
- package/fetch.js +350 -350
- package/fs.js +480 -480
- package/index.js +64 -64
- package/index.js.flow +192 -192
- package/index.web.js +1 -1
- package/ios/PrivacyInfo.xcprivacy +28 -28
- package/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.h +55 -55
- package/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.mm +992 -992
- package/ios/ReactNativeBlobUtil.xcodeproj/project.pbxproj +405 -405
- package/ios/ReactNativeBlobUtilConst.h +58 -58
- package/ios/ReactNativeBlobUtilConst.mm +47 -47
- package/ios/ReactNativeBlobUtilFS.h +108 -108
- package/ios/ReactNativeBlobUtilFS.mm +1064 -1064
- package/ios/ReactNativeBlobUtilFileTransformer.h +23 -23
- package/ios/ReactNativeBlobUtilFileTransformer.mm +20 -20
- package/ios/ReactNativeBlobUtilNetwork.h +49 -49
- package/ios/ReactNativeBlobUtilNetwork.mm +159 -159
- package/ios/ReactNativeBlobUtilProgress.h +32 -32
- package/ios/ReactNativeBlobUtilProgress.mm +57 -57
- package/ios/ReactNativeBlobUtilReqBuilder.h +37 -37
- package/ios/ReactNativeBlobUtilReqBuilder.mm +292 -292
- package/ios/ReactNativeBlobUtilRequest.h +48 -48
- package/ios/ReactNativeBlobUtilRequest.mm +584 -584
- package/ios.js +61 -61
- package/json-stream.js +42 -42
- package/lib/oboe-browser.js +2703 -2703
- package/mediacollection.js +36 -36
- package/package.json +68 -68
- package/polyfill/Blob.js +362 -362
- package/polyfill/Event.js +11 -11
- package/polyfill/EventTarget.js +78 -78
- package/polyfill/Fetch.js +219 -219
- package/polyfill/File.js +27 -27
- package/polyfill/FileReader.js +91 -91
- package/polyfill/ProgressEvent.js +32 -32
- package/polyfill/XMLHttpRequest.js +466 -466
- package/polyfill/XMLHttpRequestEventTarget.js +126 -126
- package/polyfill/index.js +11 -11
- package/react-native-blob-util.podspec +48 -48
- package/types.js +69 -69
- package/utils/log.js +40 -40
- package/utils/unicode.js +7 -7
- package/utils/uri.js +33 -33
- package/utils/uuid.js +4 -4
- package/windows/ExperimentalFeatures.props +33 -33
- package/windows/README.md +2 -2
- package/windows/ReactNativeBlobUtil/PropertySheet.props +15 -15
- package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.cpp +1836 -1836
- package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.def +3 -3
- package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.h +372 -372
- package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.vcxproj +139 -139
- package/windows/ReactNativeBlobUtil/ReactNativeBlobUtil.vcxproj.filters +43 -43
- package/windows/ReactNativeBlobUtil/ReactPackageProvider.cpp +20 -20
- package/windows/ReactNativeBlobUtil/ReactPackageProvider.h +24 -24
- package/windows/ReactNativeBlobUtil/ReactPackageProvider.idl +9 -9
- package/windows/ReactNativeBlobUtil/codegen/.clang-format +1 -1
- package/windows/ReactNativeBlobUtil/codegen/NativeBlobUtilsDataTypes.g.h +42 -42
- package/windows/ReactNativeBlobUtil/codegen/NativeBlobUtilsSpec.g.h +353 -353
- package/windows/ReactNativeBlobUtil/packages.config +3 -3
- package/windows/ReactNativeBlobUtil/packages.lock.json +59 -59
- package/windows/ReactNativeBlobUtil/pch.cpp +1 -1
- package/windows/ReactNativeBlobUtil/pch.h +30 -30
- package/windows/ReactNativeBlobUtil/resource.h +5 -5
- package/windows/ReactNativeBlobUtil/targetver.h +8 -8
- package/windows/ReactNativeBlobUtil.sln +43 -43
package/mediacollection.js
CHANGED
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import type {ReactNativeBlobUtilNative, filedescriptor} from "./types";
|
|
2
|
-
import ReactNativeBlobUtil from "./codegenSpecs/NativeBlobUtils";
|
|
3
|
-
|
|
4
|
-
function createMediafile(fd: filedescriptor, mediatype: string): Promise {
|
|
5
|
-
if ((!'parentFolder' in fd)) fd['parentFolder'] = '';
|
|
6
|
-
return ReactNativeBlobUtil.createMediaFile(fd, mediatype);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function writeToMediafile(uri: string, path: string) {
|
|
10
|
-
return ReactNativeBlobUtil.writeToMediaFile(uri, path, false);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function writeToMediafileWithTransform(uri: string, path: string) {
|
|
14
|
-
return ReactNativeBlobUtil.writeToMediaFile(uri, path, true);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
function copyToInternal(contenturi: string, destpath: string) {
|
|
18
|
-
return ReactNativeBlobUtil.copyToInternal(contenturi, destpath);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function getBlob(contenturi: string, encoding: string) {
|
|
22
|
-
return ReactNativeBlobUtil.getBlob(contenturi, encoding);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function copyToMediaStore(fd: filedescriptor, mediatype: string, path: string) {
|
|
26
|
-
return ReactNativeBlobUtil.copyToMediaStore(fd, mediatype, path);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
createMediafile,
|
|
31
|
-
writeToMediafile,
|
|
32
|
-
writeToMediafileWithTransform,
|
|
33
|
-
copyToInternal,
|
|
34
|
-
getBlob,
|
|
35
|
-
copyToMediaStore
|
|
36
|
-
};
|
|
1
|
+
import type {ReactNativeBlobUtilNative, filedescriptor} from "./types";
|
|
2
|
+
import ReactNativeBlobUtil from "./codegenSpecs/NativeBlobUtils";
|
|
3
|
+
|
|
4
|
+
function createMediafile(fd: filedescriptor, mediatype: string): Promise {
|
|
5
|
+
if ((!'parentFolder' in fd)) fd['parentFolder'] = '';
|
|
6
|
+
return ReactNativeBlobUtil.createMediaFile(fd, mediatype);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function writeToMediafile(uri: string, path: string) {
|
|
10
|
+
return ReactNativeBlobUtil.writeToMediaFile(uri, path, false);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function writeToMediafileWithTransform(uri: string, path: string) {
|
|
14
|
+
return ReactNativeBlobUtil.writeToMediaFile(uri, path, true);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function copyToInternal(contenturi: string, destpath: string) {
|
|
18
|
+
return ReactNativeBlobUtil.copyToInternal(contenturi, destpath);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getBlob(contenturi: string, encoding: string) {
|
|
22
|
+
return ReactNativeBlobUtil.getBlob(contenturi, encoding);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function copyToMediaStore(fd: filedescriptor, mediatype: string, path: string) {
|
|
26
|
+
return ReactNativeBlobUtil.copyToMediaStore(fd, mediatype, path);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
createMediafile,
|
|
31
|
+
writeToMediafile,
|
|
32
|
+
writeToMediafileWithTransform,
|
|
33
|
+
copyToInternal,
|
|
34
|
+
getBlob,
|
|
35
|
+
copyToMediaStore
|
|
36
|
+
};
|
package/package.json
CHANGED
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-native-blob-util",
|
|
3
|
-
"version": "0.22.
|
|
4
|
-
"description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
|
|
5
|
-
"main": "index",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {
|
|
10
|
-
"base-64": "0.1.0",
|
|
11
|
-
"glob": "^10.3.10"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"@
|
|
40
|
-
"
|
|
41
|
-
"eslint": "
|
|
42
|
-
"eslint-
|
|
43
|
-
"
|
|
44
|
-
"react": "
|
|
45
|
-
"react-native": "0.
|
|
46
|
-
},
|
|
47
|
-
"peerDependencies": {
|
|
48
|
-
"react": "*",
|
|
49
|
-
"react-native": "*"
|
|
50
|
-
},
|
|
51
|
-
"codegenConfig": {
|
|
52
|
-
"name": "ReactNativeBlobUtilSpec",
|
|
53
|
-
"type": "modules",
|
|
54
|
-
"jsSrcsDir": "codegenSpecs",
|
|
55
|
-
"windows": {
|
|
56
|
-
"namespace": "ReactNativeBlobUtilCodegen",
|
|
57
|
-
"outputDirectory": "windows/ReactNativeBlobUtil/codegen",
|
|
58
|
-
"separateDataTypes": true
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
"react-native-windows": {
|
|
62
|
-
"init-windows": {
|
|
63
|
-
"name": "ReactNativeBlobUtil",
|
|
64
|
-
"namespace": "ReactNativeBlobUtil",
|
|
65
|
-
"template": "cpp-lib"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-blob-util",
|
|
3
|
+
"version": "0.22.2",
|
|
4
|
+
"description": "A module provides upload, download, and files access API. Supports file stream read/write for process large files.",
|
|
5
|
+
"main": "index",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"base-64": "0.1.0",
|
|
11
|
+
"glob": "^10.3.10"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"react-native",
|
|
15
|
+
"fetch",
|
|
16
|
+
"blob",
|
|
17
|
+
"fs",
|
|
18
|
+
"upload",
|
|
19
|
+
"file",
|
|
20
|
+
"download",
|
|
21
|
+
"filestream",
|
|
22
|
+
"image header"
|
|
23
|
+
],
|
|
24
|
+
"repository": {
|
|
25
|
+
"url": "https://github.com/RonRadtke/react-native-blob-util"
|
|
26
|
+
},
|
|
27
|
+
"author": {
|
|
28
|
+
"name": "RonRadtke",
|
|
29
|
+
"username": "RonRadtke"
|
|
30
|
+
},
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"contributors": [
|
|
33
|
+
"Traviskn <>",
|
|
34
|
+
"Ben <benhsieh@catchplay.com>",
|
|
35
|
+
"wkh237 <xeiyan@gmail.com>"
|
|
36
|
+
],
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@react-native-community/eslint-config": "^3.0.0",
|
|
39
|
+
"@typescript-eslint/parser": "^3.4.0",
|
|
40
|
+
"eslint": ">7.0.0",
|
|
41
|
+
"eslint-config-defaults": "^9.0.0",
|
|
42
|
+
"eslint-plugin-react": "^7.24.0",
|
|
43
|
+
"react": "19.0.0",
|
|
44
|
+
"react-native": "0.78.2",
|
|
45
|
+
"react-native-windows": "0.78.2"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"react": "*",
|
|
49
|
+
"react-native": "*"
|
|
50
|
+
},
|
|
51
|
+
"codegenConfig": {
|
|
52
|
+
"name": "ReactNativeBlobUtilSpec",
|
|
53
|
+
"type": "modules",
|
|
54
|
+
"jsSrcsDir": "codegenSpecs",
|
|
55
|
+
"windows": {
|
|
56
|
+
"namespace": "ReactNativeBlobUtilCodegen",
|
|
57
|
+
"outputDirectory": "windows/ReactNativeBlobUtil/codegen",
|
|
58
|
+
"separateDataTypes": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"react-native-windows": {
|
|
62
|
+
"init-windows": {
|
|
63
|
+
"name": "ReactNativeBlobUtil",
|
|
64
|
+
"namespace": "ReactNativeBlobUtil",
|
|
65
|
+
"template": "cpp-lib"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|