Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
wuyanan
2024-08-01 10:04:18 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c3076d108c0df6d5eda8365c88abaadb742b343d
c3076d10
1 parent
1cb7f689
Revert "ref |> 新增OSSUploadManager"
This reverts commit
56dbb306
.
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
42 deletions
sight_harmony/features/wdHwAbility/Index.ets
sight_harmony/features/wdHwAbility/oh-package.json5
sight_harmony/features/wdHwAbility/src/main/ets/aliOSS/OSSUploadManager.ets
sight_harmony/features/wdHwAbility/Index.ets
View file @
c3076d1
...
...
@@ -3,6 +3,4 @@ export { add } from "./src/main/ets/utils/Calc"
export { HWLocationUtils } from './src/main/ets/location/HWLocationUtils'
// export { WDPushNotificationManager } from "./src/main/ets/notification/WDPushNotificationManager"
export { GetuiPush } from "./src/main/ets/getuiPush/GetuiPush"
export { OSSUploadManager,OSSConfigSceneType,OSSFileType,OSSUploadResult } from "./src/main/ets/aliOSS/OSSUploadManager"
\ No newline at end of file
export { GetuiPush } from "./src/main/ets/getuiPush/GetuiPush"
\ No newline at end of file
...
...
sight_harmony/features/wdHwAbility/oh-package.json5
View file @
c3076d1
...
...
@@ -14,7 +14,6 @@
"wdBean"
:
"file:../../features/wdBean"
,
"wdRouter"
:
"file:../../commons/wdRouter"
,
"wdTracking"
:
"file:../../features/wdTracking"
,
"wdNetwork"
:
"file:../../commons/wdNetwork"
,
"wdossclient"
:
"file:../../WdOssClientSdk/wdossclient"
"wdNetwork"
:
"file:../../commons/wdNetwork"
}
}
\ No newline at end of file
...
...
sight_harmony/features/wdHwAbility/src/main/ets/aliOSS/OSSUploadManager.ets
deleted
100644 → 0
View file @
1cb7f68
import { WDOssClient } from 'wdossclient'
export enum OSSConfigSceneType {
feedback = 1,
}
export enum OSSFileType {
image = 0,
video = 1,
}
export class OSSUploadResult {
ossFile?: string
}
export class OSSUploadManager {
private accessKeyId?:string
private accessKeySecret?:string
private sessionToken?:string
static uploadFile(fileUri: string, scene: OSSConfigSceneType, fileType: OSSFileType) : Promise<OSSUploadResult> {
return new Promise((success, fail) => {
success({})
})
}
upload(fileUri: string, endpoint:string, bucketName:string, objectName:string) : boolean {
if (!this.accessKeyId || !this.accessKeySecret || !this.sessionToken) {
return false
}
return WDOssClient.UploadFile(endpoint, this.accessKeyId, this.accessKeySecret, this.sessionToken, bucketName, objectName, fileUri)
}
}
\ No newline at end of file
Please
register
or
login
to post a comment