@react-native-ohos/react-native-fileupload 1.1.1-rc.2 → 1.1.1
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/LICENSE +20 -20
- package/NativeRNFileupload.ts +7 -7
- package/OAT.xml +46 -46
- package/README.OpenSource +10 -10
- package/README.md +9 -9
- package/harmony/fileUpload/LICENSE +19 -19
- package/harmony/fileUpload/build-profile.json5 +8 -8
- package/harmony/fileUpload/hvigorfile.ts +6 -6
- package/harmony/fileUpload/index.ets +3 -3
- package/harmony/fileUpload/obfuscation-rules.txt +17 -17
- package/harmony/fileUpload/oh-package.json5 +11 -11
- package/harmony/fileUpload/src/main/cpp/CMakeLists.txt +8 -8
- package/harmony/fileUpload/src/main/cpp/FileUploadPackage.h +35 -35
- package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/BaseReactNativeFileuploadPackage.h +65 -65
- package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.cpp +16 -16
- package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.h +16 -16
- package/harmony/fileUpload/src/main/ets/FileUpLoadModule.ts +106 -106
- package/harmony/fileUpload/src/main/ets/FileUpLoadPackage.ets +46 -46
- package/harmony/fileUpload/src/main/ets/Logger.ts +63 -63
- package/harmony/fileUpload/src/main/ets/generated/components/ts.ts +5 -5
- package/harmony/fileUpload/src/main/ets/generated/index.ets +5 -5
- package/harmony/fileUpload/src/main/ets/generated/ts.ts +6 -6
- package/harmony/fileUpload/src/main/ets/generated/turboModules/RNFileupload.ts +14 -14
- package/harmony/fileUpload/src/main/ets/generated/turboModules/ts.ts +5 -5
- package/harmony/fileUpload/src/main/module.json5 +11 -11
- package/harmony/fileUpload/src/main/resources/base/element/string.json +8 -8
- package/harmony/fileUpload/src/main/resources/en_US/element/string.json +8 -8
- package/harmony/fileUpload/src/main/resources/zh_CN/element/string.json +8 -8
- package/harmony/fileUpload/src/test/List.test.ets +4 -4
- package/harmony/fileUpload/src/test/LocalUnit.test.ets +32 -32
- package/harmony/fileUpload/ts.ets +1 -1
- package/harmony/fileupload.har +0 -0
- package/index.js +1 -1
- package/package.json +46 -46
package/LICENSE
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015 Liucw & PhilippKrone
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Liucw & PhilippKrone
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/NativeRNFileupload.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { TurboModule } from "react-native/Libraries/TurboModule/RCTExport";
|
|
2
|
-
import { TurboModuleRegistry } from "react-native";
|
|
3
|
-
|
|
4
|
-
export interface Spec extends TurboModule {
|
|
5
|
-
upload(options: Object, callback: (err: string, result: string)=>void): void;
|
|
6
|
-
}
|
|
7
|
-
|
|
1
|
+
import type { TurboModule } from "react-native/Libraries/TurboModule/RCTExport";
|
|
2
|
+
import { TurboModuleRegistry } from "react-native";
|
|
3
|
+
|
|
4
|
+
export interface Spec extends TurboModule {
|
|
5
|
+
upload(options: Object, callback: (err: string, result: string)=>void): void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
8
|
export default TurboModuleRegistry.getEnforcing<Spec>("RNFileupload");
|
package/OAT.xml
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<configuration>
|
|
3
|
-
<oatconfig>
|
|
4
|
-
<licensefile>LICENSE</licensefile>
|
|
5
|
-
<filefilterlist>
|
|
6
|
-
<filefilter name="copyrightPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
7
|
-
<filteritem type="filepath" name="harmony/fileUpload/src/.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
8
|
-
<filteritem type="filepath" name="harmony/fileUpload/index.ets" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
9
|
-
<filteritem type="filepath" name="harmony/fileUpload/ts.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
10
|
-
<filteritem type="filename" name="NativeRNFileupload.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
11
|
-
<filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加版权头"/>
|
|
12
|
-
<filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加版权头"/>
|
|
13
|
-
<filteritem type="filename" name="*.proto" desc="资源文件,不需要添加版权头"/>
|
|
14
|
-
<filteritem type="filename" name="*.json" desc="资源文件,不需要添加版权头"/>
|
|
15
|
-
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
16
|
-
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
17
|
-
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
18
|
-
<filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
|
|
19
|
-
</filefilter>
|
|
20
|
-
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
21
|
-
<filteritem type="filepath" name="harmony/fileUpload/src/.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
22
|
-
<filteritem type="filepath" name="harmony/fileUpload/index.ets" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
23
|
-
<filteritem type="filepath" name="harmony/fileUpload/ts.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
24
|
-
<filteritem type="filename" name="NativeRNFileupload.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
25
|
-
<filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加许可证头"/>
|
|
26
|
-
<filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加许可证头"/>
|
|
27
|
-
<filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
|
|
28
|
-
<filteritem type="filename" name="*.proto" desc="资源文件,不需要添加许可证头"/>
|
|
29
|
-
<filteritem type="filename" name="*.json" desc="资源文件,不需要添加许可证头"/>
|
|
30
|
-
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
31
|
-
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
32
|
-
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
33
|
-
</filefilter>
|
|
34
|
-
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for resources files policies">
|
|
35
|
-
<filteritem type="filepath" name="harmony/fileupload.har" desc="项目打包文件"/>
|
|
36
|
-
<filteritem type="filename" name="icon.png" desc="应用图标"/>
|
|
37
|
-
<filteritem type="filename" name="app_icon.png" desc="应用图标"/>
|
|
38
|
-
<filteritem type="filename" name="warn.png" desc="页面展示图标"/>
|
|
39
|
-
</filefilter>
|
|
40
|
-
</filefilterlist>
|
|
41
|
-
<policylist>
|
|
42
|
-
<policy name="projectPolicy" desc="">
|
|
43
|
-
<policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
|
|
44
|
-
</policy>
|
|
45
|
-
</policylist>
|
|
46
|
-
</oatconfig>
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<configuration>
|
|
3
|
+
<oatconfig>
|
|
4
|
+
<licensefile>LICENSE</licensefile>
|
|
5
|
+
<filefilterlist>
|
|
6
|
+
<filefilter name="copyrightPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
7
|
+
<filteritem type="filepath" name="harmony/fileUpload/src/.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
8
|
+
<filteritem type="filepath" name="harmony/fileUpload/index.ets" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
9
|
+
<filteritem type="filepath" name="harmony/fileUpload/ts.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
10
|
+
<filteritem type="filename" name="NativeRNFileupload.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
11
|
+
<filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加版权头"/>
|
|
12
|
+
<filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加版权头"/>
|
|
13
|
+
<filteritem type="filename" name="*.proto" desc="资源文件,不需要添加版权头"/>
|
|
14
|
+
<filteritem type="filename" name="*.json" desc="资源文件,不需要添加版权头"/>
|
|
15
|
+
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
16
|
+
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
17
|
+
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
18
|
+
<filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
|
|
19
|
+
</filefilter>
|
|
20
|
+
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
|
21
|
+
<filteritem type="filepath" name="harmony/fileUpload/src/.*" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
22
|
+
<filteritem type="filepath" name="harmony/fileUpload/index.ets" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
23
|
+
<filteritem type="filepath" name="harmony/fileUpload/ts.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不手动修改"/>
|
|
24
|
+
<filteritem type="filename" name="NativeRNFileupload.ts" desc="第三方开源软件源码,不修改版权头,以防有修改版权风险"/>
|
|
25
|
+
<filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加许可证头"/>
|
|
26
|
+
<filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加许可证头"/>
|
|
27
|
+
<filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
|
|
28
|
+
<filteritem type="filename" name="*.proto" desc="资源文件,不需要添加许可证头"/>
|
|
29
|
+
<filteritem type="filename" name="*.json" desc="资源文件,不需要添加许可证头"/>
|
|
30
|
+
<filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
31
|
+
<filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
32
|
+
<filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
|
|
33
|
+
</filefilter>
|
|
34
|
+
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for resources files policies">
|
|
35
|
+
<filteritem type="filepath" name="harmony/fileupload.har" desc="项目打包文件"/>
|
|
36
|
+
<filteritem type="filename" name="icon.png" desc="应用图标"/>
|
|
37
|
+
<filteritem type="filename" name="app_icon.png" desc="应用图标"/>
|
|
38
|
+
<filteritem type="filename" name="warn.png" desc="页面展示图标"/>
|
|
39
|
+
</filefilter>
|
|
40
|
+
</filefilterlist>
|
|
41
|
+
<policylist>
|
|
42
|
+
<policy name="projectPolicy" desc="">
|
|
43
|
+
<policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
|
|
44
|
+
</policy>
|
|
45
|
+
</policylist>
|
|
46
|
+
</oatconfig>
|
|
47
47
|
</configuration>
|
package/README.OpenSource
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"Name": "react-native-fileupload",
|
|
4
|
-
"License": "MIT License",
|
|
5
|
-
"License File": "LICENSE",
|
|
6
|
-
"Version Number": "1.1.0",
|
|
7
|
-
"Owner" : "xiafeng@huawei.com",
|
|
8
|
-
"Upstream URL": "https://github.com/PhilippKrone/react-native-fileupload",
|
|
9
|
-
"Description": "A file upload plugin for react-native."
|
|
10
|
-
}
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"Name": "react-native-fileupload",
|
|
4
|
+
"License": "MIT License",
|
|
5
|
+
"License File": "LICENSE",
|
|
6
|
+
"Version Number": "1.1.0",
|
|
7
|
+
"Owner" : "xiafeng@huawei.com",
|
|
8
|
+
"Upstream URL": "https://github.com/PhilippKrone/react-native-fileupload",
|
|
9
|
+
"Description": "A file upload plugin for react-native."
|
|
10
|
+
}
|
|
11
11
|
]
|
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# @react-native-ohos/react-native-fileupload
|
|
2
|
-
This project is based on [react-native-fileupload](https://github.com/PhilippKrone/react-native-fileupload)@1.1.0
|
|
3
|
-
## Documentation
|
|
4
|
-
[中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-fileupload.md)
|
|
5
|
-
|
|
6
|
-
[English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-fileupload.md)
|
|
7
|
-
|
|
8
|
-
## License
|
|
9
|
-
This library is licensed under [MIT License (MIT)](https://github.com/react-native-oh-library/react-native-fileupload/blob/sig/LICENSE).
|
|
1
|
+
# @react-native-ohos/react-native-fileupload
|
|
2
|
+
This project is based on [react-native-fileupload](https://github.com/PhilippKrone/react-native-fileupload)@1.1.0
|
|
3
|
+
## Documentation
|
|
4
|
+
[中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-fileupload.md)
|
|
5
|
+
|
|
6
|
+
[English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-fileupload.md)
|
|
7
|
+
|
|
8
|
+
## License
|
|
9
|
+
This library is licensed under [MIT License (MIT)](https://github.com/react-native-oh-library/react-native-fileupload/blob/sig/LICENSE).
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2015 Liucw & PhilippKrone
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
-
the Software without restriction, including without limitation the rights to
|
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
-
subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 Liucw & PhilippKrone
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
7
|
+
the Software without restriction, including without limitation the rights to
|
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
10
|
+
subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
20
20
|
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"apiType": "stageMode",
|
|
3
|
-
"targets": [
|
|
4
|
-
{
|
|
5
|
-
"name": "default"
|
|
6
|
-
}
|
|
7
|
-
]
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"apiType": "stageMode",
|
|
3
|
+
"targets": [
|
|
4
|
+
{
|
|
5
|
+
"name": "default"
|
|
6
|
+
}
|
|
7
|
+
]
|
|
8
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
|
5
|
-
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
|
6
|
-
}
|
|
1
|
+
import { harTasks } from '@ohos/hvigor-ohos-plugin';
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */
|
|
5
|
+
plugins:[] /* Custom plugin to extend the functionality of Hvigor. */
|
|
6
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FileUploadPackage } from './src/main/ets/FileUpLoadPackage'
|
|
2
|
-
export * from "./ts";
|
|
3
|
-
export default FileUploadPackage;
|
|
1
|
+
import { FileUploadPackage } from './src/main/ets/FileUpLoadPackage'
|
|
2
|
+
export * from "./ts";
|
|
3
|
+
export default FileUploadPackage;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# Define project specific obfuscation rules here.
|
|
2
|
-
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
|
3
|
-
#
|
|
4
|
-
# For more details, see
|
|
5
|
-
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
|
|
6
|
-
|
|
7
|
-
# Obfuscation options:
|
|
8
|
-
# -disable-obfuscation: disable all obfuscations
|
|
9
|
-
# -enable-property-obfuscation: obfuscate the property names
|
|
10
|
-
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
|
11
|
-
# -compact: remove unnecessary blank spaces and all line feeds
|
|
12
|
-
# -remove-log: remove all console.* statements
|
|
13
|
-
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
|
14
|
-
# -apply-namecache: reuse the given cache file
|
|
15
|
-
|
|
16
|
-
# Keep options:
|
|
17
|
-
# -keep-property-name: specifies property names that you want to keep
|
|
1
|
+
# Define project specific obfuscation rules here.
|
|
2
|
+
# You can include the obfuscation configuration files in the current module's build-profile.json5.
|
|
3
|
+
#
|
|
4
|
+
# For more details, see
|
|
5
|
+
# https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
|
|
6
|
+
|
|
7
|
+
# Obfuscation options:
|
|
8
|
+
# -disable-obfuscation: disable all obfuscations
|
|
9
|
+
# -enable-property-obfuscation: obfuscate the property names
|
|
10
|
+
# -enable-toplevel-obfuscation: obfuscate the names in the global scope
|
|
11
|
+
# -compact: remove unnecessary blank spaces and all line feeds
|
|
12
|
+
# -remove-log: remove all console.* statements
|
|
13
|
+
# -print-namecache: print the name cache that contains the mapping from the old names to new names
|
|
14
|
+
# -apply-namecache: reuse the given cache file
|
|
15
|
+
|
|
16
|
+
# Keep options:
|
|
17
|
+
# -keep-property-name: specifies property names that you want to keep
|
|
18
18
|
# -keep-global-name: specifies names that you want to keep in the global scope
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@react-native-ohos/react-native-fileupload",
|
|
3
|
-
"version": "1.1.1
|
|
4
|
-
"description": "A file upload plugin for react-native.",
|
|
5
|
-
"main": "index.ets",
|
|
6
|
-
"author": "",
|
|
7
|
-
"license": "MIT",
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"@rnoh/react-native-openharmony": "file:../react_native_openharmony"
|
|
10
|
-
}
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-native-ohos/react-native-fileupload",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"description": "A file upload plugin for react-native.",
|
|
5
|
+
"main": "index.ets",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@rnoh/react-native-openharmony": "file:../react_native_openharmony"
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 3.13)
|
|
2
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
3
|
-
|
|
4
|
-
set(rnoh_fileupload_generated_dir "${CMAKE_CURRENT_SOURCE_DIR}/generated")
|
|
5
|
-
file(GLOB_RECURSE rnoh_fileupload_generated_SRC "${rnoh_fileupload_generated_dir}/**/*.cpp")
|
|
6
|
-
file(GLOB rnoh_fileupload_SRC CONFIGURE_DEPENDS *.cpp)
|
|
7
|
-
add_library(rnoh_fileupload SHARED ${rnoh_fileupload_SRC} ${rnoh_fileupload_generated_SRC})
|
|
8
|
-
target_include_directories(rnoh_fileupload PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_fileupload_generated_dir})
|
|
1
|
+
cmake_minimum_required(VERSION 3.13)
|
|
2
|
+
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
3
|
+
|
|
4
|
+
set(rnoh_fileupload_generated_dir "${CMAKE_CURRENT_SOURCE_DIR}/generated")
|
|
5
|
+
file(GLOB_RECURSE rnoh_fileupload_generated_SRC "${rnoh_fileupload_generated_dir}/**/*.cpp")
|
|
6
|
+
file(GLOB rnoh_fileupload_SRC CONFIGURE_DEPENDS *.cpp)
|
|
7
|
+
add_library(rnoh_fileupload SHARED ${rnoh_fileupload_SRC} ${rnoh_fileupload_generated_SRC})
|
|
8
|
+
target_include_directories(rnoh_fileupload PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${rnoh_fileupload_generated_dir})
|
|
9
9
|
target_link_libraries(rnoh_fileupload PUBLIC rnoh)
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MIT License
|
|
3
|
-
*
|
|
4
|
-
* Copyright (C) 2025 Huawei Device Co., Ltd.
|
|
5
|
-
*
|
|
6
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
* in the Software without restriction, including without limitation the rights
|
|
9
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
* furnished to do so, subject to the following conditions:
|
|
12
|
-
*
|
|
13
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
* copies or substantial portions of the Software.
|
|
15
|
-
*
|
|
16
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
* SOFTWARE.
|
|
23
|
-
*/
|
|
24
|
-
#ifndef FILEUPLOADPACKAGE_H
|
|
25
|
-
#define FILEUPLOADPACKAGE_H
|
|
26
|
-
|
|
27
|
-
#include "generated/RNOH/generated/BaseReactNativeFileuploadPackage.h"
|
|
28
|
-
#pragma once
|
|
29
|
-
|
|
30
|
-
namespace rnoh {
|
|
31
|
-
class FileUploadPackage : public BaseReactNativeFileuploadPackage {
|
|
32
|
-
using Super = BaseReactNativeFileuploadPackage;
|
|
33
|
-
using Super::Super;
|
|
34
|
-
};
|
|
35
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* MIT License
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2025 Huawei Device Co., Ltd.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
#ifndef FILEUPLOADPACKAGE_H
|
|
25
|
+
#define FILEUPLOADPACKAGE_H
|
|
26
|
+
|
|
27
|
+
#include "generated/RNOH/generated/BaseReactNativeFileuploadPackage.h"
|
|
28
|
+
#pragma once
|
|
29
|
+
|
|
30
|
+
namespace rnoh {
|
|
31
|
+
class FileUploadPackage : public BaseReactNativeFileuploadPackage {
|
|
32
|
+
using Super = BaseReactNativeFileuploadPackage;
|
|
33
|
+
using Super::Super;
|
|
34
|
+
};
|
|
35
|
+
} // namespace rnoh
|
|
36
36
|
#endif // FILEUPLOADPACKAGE_H
|
package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/BaseReactNativeFileuploadPackage.h
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#pragma once
|
|
6
|
-
|
|
7
|
-
#include "RNOH/Package.h"
|
|
8
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
9
|
-
#include "RNOH/generated/turbo_modules/RNFileupload.h"
|
|
10
|
-
|
|
11
|
-
namespace rnoh {
|
|
12
|
-
|
|
13
|
-
class BaseReactNativeFileuploadPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
14
|
-
public:
|
|
15
|
-
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
|
16
|
-
if (name == "RNFileupload") {
|
|
17
|
-
return std::make_shared<RNFileupload>(ctx, name);
|
|
18
|
-
}
|
|
19
|
-
return nullptr;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
class BaseReactNativeFileuploadPackageEventEmitRequestHandler : public EventEmitRequestHandler {
|
|
24
|
-
public:
|
|
25
|
-
void handleEvent(Context const &ctx) override {
|
|
26
|
-
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
|
|
27
|
-
if (eventEmitter == nullptr) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
std::vector<std::string> supportedEventNames = {
|
|
32
|
-
};
|
|
33
|
-
if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
|
|
34
|
-
eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class BaseReactNativeFileuploadPackage : public Package {
|
|
41
|
-
public:
|
|
42
|
-
BaseReactNativeFileuploadPackage(Package::Context ctx) : Package(ctx){};
|
|
43
|
-
|
|
44
|
-
std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
|
|
45
|
-
return std::make_unique<BaseReactNativeFileuploadPackageTurboModuleFactoryDelegate>();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
|
|
49
|
-
return {
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
ComponentJSIBinderByString createComponentJSIBinderByName() override {
|
|
54
|
-
return {
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
EventEmitRequestHandlers createEventEmitRequestHandlers() override {
|
|
59
|
-
return {
|
|
60
|
-
std::make_shared<BaseReactNativeFileuploadPackageEventEmitRequestHandler>(),
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include "RNOH/Package.h"
|
|
8
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
9
|
+
#include "RNOH/generated/turbo_modules/RNFileupload.h"
|
|
10
|
+
|
|
11
|
+
namespace rnoh {
|
|
12
|
+
|
|
13
|
+
class BaseReactNativeFileuploadPackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
14
|
+
public:
|
|
15
|
+
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
|
16
|
+
if (name == "RNFileupload") {
|
|
17
|
+
return std::make_shared<RNFileupload>(ctx, name);
|
|
18
|
+
}
|
|
19
|
+
return nullptr;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
class BaseReactNativeFileuploadPackageEventEmitRequestHandler : public EventEmitRequestHandler {
|
|
24
|
+
public:
|
|
25
|
+
void handleEvent(Context const &ctx) override {
|
|
26
|
+
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
|
|
27
|
+
if (eventEmitter == nullptr) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
std::vector<std::string> supportedEventNames = {
|
|
32
|
+
};
|
|
33
|
+
if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
|
|
34
|
+
eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class BaseReactNativeFileuploadPackage : public Package {
|
|
41
|
+
public:
|
|
42
|
+
BaseReactNativeFileuploadPackage(Package::Context ctx) : Package(ctx){};
|
|
43
|
+
|
|
44
|
+
std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
|
|
45
|
+
return std::make_unique<BaseReactNativeFileuploadPackageTurboModuleFactoryDelegate>();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
|
|
49
|
+
return {
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
ComponentJSIBinderByString createComponentJSIBinderByName() override {
|
|
54
|
+
return {
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
EventEmitRequestHandlers createEventEmitRequestHandlers() override {
|
|
59
|
+
return {
|
|
60
|
+
std::make_shared<BaseReactNativeFileuploadPackageEventEmitRequestHandler>(),
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
} // namespace rnoh
|
package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.cpp
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#include "RNFileupload.h"
|
|
6
|
-
|
|
7
|
-
namespace rnoh {
|
|
8
|
-
using namespace facebook;
|
|
9
|
-
|
|
10
|
-
RNFileupload::RNFileupload(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
-
methodMap_ = {
|
|
12
|
-
ARK_METHOD_METADATA(upload, 2),
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#include "RNFileupload.h"
|
|
6
|
+
|
|
7
|
+
namespace rnoh {
|
|
8
|
+
using namespace facebook;
|
|
9
|
+
|
|
10
|
+
RNFileupload::RNFileupload(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
11
|
+
methodMap_ = {
|
|
12
|
+
ARK_METHOD_METADATA(upload, 2),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
} // namespace rnoh
|
package/harmony/fileUpload/src/main/cpp/generated/RNOH/generated/turbo_modules/RNFileupload.h
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
#pragma once
|
|
6
|
-
|
|
7
|
-
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
-
|
|
9
|
-
namespace rnoh {
|
|
10
|
-
|
|
11
|
-
class JSI_EXPORT RNFileupload : public ArkTSTurboModule {
|
|
12
|
-
public:
|
|
13
|
-
RNFileupload(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
} // namespace rnoh
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-lib-harmony"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#pragma once
|
|
6
|
+
|
|
7
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
8
|
+
|
|
9
|
+
namespace rnoh {
|
|
10
|
+
|
|
11
|
+
class JSI_EXPORT RNFileupload : public ArkTSTurboModule {
|
|
12
|
+
public:
|
|
13
|
+
RNFileupload(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
} // namespace rnoh
|