react-native-blob-util 0.24.6 → 0.24.7
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.json +96 -96
- package/LICENSE +21 -21
- package/Migration.md +41 -41
- package/NuGet.config +11 -11
- package/README.md +1109 -1109
- package/android/gradle.properties +1 -1
- package/android/src/main/AndroidManifest.xml +37 -37
- package/android/src/main/java/com/ReactNativeBlobUtil/ReactNativeBlobUtilConfig.java +59 -59
- 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 +1092 -1092
- 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.d.ts +880 -880
- 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 +1013 -1013
- 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 +1080 -1080
- 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 +77 -77
- 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,77 +1,77 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name" : "react-native-blob-util",
|
|
3
|
-
"version" : "0.24.
|
|
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" : "13.0.
|
|
12
|
-
},
|
|
13
|
-
"keywords" : [
|
|
14
|
-
"react-native",
|
|
15
|
-
"fetch",
|
|
16
|
-
"blob",
|
|
17
|
-
"fs",
|
|
18
|
-
"upload",
|
|
19
|
-
"file",
|
|
20
|
-
"download",
|
|
21
|
-
"filestream",
|
|
22
|
-
"image header",
|
|
23
|
-
"android",
|
|
24
|
-
"ios",
|
|
25
|
-
"file system"
|
|
26
|
-
],
|
|
27
|
-
"repository" : {
|
|
28
|
-
"url" : "https://github.com/RonRadtke/react-native-blob-util"
|
|
29
|
-
},
|
|
30
|
-
"author" : {
|
|
31
|
-
"name" : "RonRadtke",
|
|
32
|
-
"username" : "RonRadtke"
|
|
33
|
-
},
|
|
34
|
-
"funding": {
|
|
35
|
-
"type": "github",
|
|
36
|
-
"url": "https://github.com/sponsors/ronradtke"
|
|
37
|
-
},
|
|
38
|
-
"license" : "MIT",
|
|
39
|
-
"contributors" : [
|
|
40
|
-
"Traviskn <>",
|
|
41
|
-
"Ben <benhsieh@catchplay.com>",
|
|
42
|
-
"wkh237 <xeiyan@gmail.com>"
|
|
43
|
-
],
|
|
44
|
-
"devDependencies" : {
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
46
|
-
"@typescript-eslint/parser": "^8.46.4",
|
|
47
|
-
"eslint": "^8.57.1",
|
|
48
|
-
"eslint-plugin-ft-flow" : "^3.0.11",
|
|
49
|
-
"eslint-plugin-import" : "^2.32.0",
|
|
50
|
-
"eslint-plugin-react" : "^7.37.5",
|
|
51
|
-
"eslint-plugin-react-native" : "^5.0.0",
|
|
52
|
-
"react" : "19.0.0",
|
|
53
|
-
"react-native" : "0.78.2",
|
|
54
|
-
"react-native-windows" : "0.78.2"
|
|
55
|
-
},
|
|
56
|
-
"peerDependencies" : {
|
|
57
|
-
"react" : "*",
|
|
58
|
-
"react-native" : "*"
|
|
59
|
-
},
|
|
60
|
-
"codegenConfig" : {
|
|
61
|
-
"name" : "ReactNativeBlobUtilSpec",
|
|
62
|
-
"type" : "modules",
|
|
63
|
-
"jsSrcsDir" : "codegenSpecs",
|
|
64
|
-
"windows" : {
|
|
65
|
-
"namespace" : "ReactNativeBlobUtilCodegen",
|
|
66
|
-
"outputDirectory" : "windows/ReactNativeBlobUtil/codegen",
|
|
67
|
-
"separateDataTypes" : true
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
"react-native-windows" : {
|
|
71
|
-
"init-windows" : {
|
|
72
|
-
"name" : "ReactNativeBlobUtil",
|
|
73
|
-
"namespace" : "ReactNativeBlobUtil",
|
|
74
|
-
"template" : "cpp-lib"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name" : "react-native-blob-util",
|
|
3
|
+
"version" : "0.24.7",
|
|
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" : "13.0.1"
|
|
12
|
+
},
|
|
13
|
+
"keywords" : [
|
|
14
|
+
"react-native",
|
|
15
|
+
"fetch",
|
|
16
|
+
"blob",
|
|
17
|
+
"fs",
|
|
18
|
+
"upload",
|
|
19
|
+
"file",
|
|
20
|
+
"download",
|
|
21
|
+
"filestream",
|
|
22
|
+
"image header",
|
|
23
|
+
"android",
|
|
24
|
+
"ios",
|
|
25
|
+
"file system"
|
|
26
|
+
],
|
|
27
|
+
"repository" : {
|
|
28
|
+
"url" : "https://github.com/RonRadtke/react-native-blob-util"
|
|
29
|
+
},
|
|
30
|
+
"author" : {
|
|
31
|
+
"name" : "RonRadtke",
|
|
32
|
+
"username" : "RonRadtke"
|
|
33
|
+
},
|
|
34
|
+
"funding": {
|
|
35
|
+
"type": "github",
|
|
36
|
+
"url": "https://github.com/sponsors/ronradtke"
|
|
37
|
+
},
|
|
38
|
+
"license" : "MIT",
|
|
39
|
+
"contributors" : [
|
|
40
|
+
"Traviskn <>",
|
|
41
|
+
"Ben <benhsieh@catchplay.com>",
|
|
42
|
+
"wkh237 <xeiyan@gmail.com>"
|
|
43
|
+
],
|
|
44
|
+
"devDependencies" : {
|
|
45
|
+
"@typescript-eslint/eslint-plugin": "^8.46.4",
|
|
46
|
+
"@typescript-eslint/parser": "^8.46.4",
|
|
47
|
+
"eslint": "^8.57.1",
|
|
48
|
+
"eslint-plugin-ft-flow" : "^3.0.11",
|
|
49
|
+
"eslint-plugin-import" : "^2.32.0",
|
|
50
|
+
"eslint-plugin-react" : "^7.37.5",
|
|
51
|
+
"eslint-plugin-react-native" : "^5.0.0",
|
|
52
|
+
"react" : "19.0.0",
|
|
53
|
+
"react-native" : "0.78.2",
|
|
54
|
+
"react-native-windows" : "0.78.2"
|
|
55
|
+
},
|
|
56
|
+
"peerDependencies" : {
|
|
57
|
+
"react" : "*",
|
|
58
|
+
"react-native" : "*"
|
|
59
|
+
},
|
|
60
|
+
"codegenConfig" : {
|
|
61
|
+
"name" : "ReactNativeBlobUtilSpec",
|
|
62
|
+
"type" : "modules",
|
|
63
|
+
"jsSrcsDir" : "codegenSpecs",
|
|
64
|
+
"windows" : {
|
|
65
|
+
"namespace" : "ReactNativeBlobUtilCodegen",
|
|
66
|
+
"outputDirectory" : "windows/ReactNativeBlobUtil/codegen",
|
|
67
|
+
"separateDataTypes" : true
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"react-native-windows" : {
|
|
71
|
+
"init-windows" : {
|
|
72
|
+
"name" : "ReactNativeBlobUtil",
|
|
73
|
+
"namespace" : "ReactNativeBlobUtil",
|
|
74
|
+
"template" : "cpp-lib"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|