tt-uploader 1.3.9 → 1.4.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tt-uploader",
3
- "version": "1.3.9",
3
+ "version": "1.4.0",
4
4
  "description": "upload component for veVod and veImageX",
5
5
  "main": "dist/index.js",
6
6
  "typings": "./types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -7,8 +7,8 @@ export interface STSToken {
7
7
  }
8
8
 
9
9
  export interface Action {
10
- name: 'GetMeta' | 'StartWorkflow' | 'Snapshot' | 'Encryption' | 'AddOptionInfo'
11
- input?: any
10
+ Name: 'GetMeta' | 'StartWorkflow' | 'Snapshot' | 'Encryption' | 'AddOptionInfo'
11
+ Input?: any
12
12
  }
13
13
 
14
14
  export interface VideoConfig {
@@ -46,6 +46,13 @@ export interface InitConfig {
46
46
  videoHost?:string
47
47
  imageHost?:string
48
48
  logFromRegion?:string
49
+ useCloudControl?: boolean
50
+ /**
51
+ * 根据文件大小决定分片大小
52
+ * @param fileSize 待上传的文件大小
53
+ * @returns 分片大小
54
+ */
55
+ getSliceFunc?: (fileSize: number) => number
49
56
  }
50
57
 
51
58
  export interface UpdateOptions {
@@ -77,6 +84,7 @@ export interface ImageXFileOption {
77
84
  serviceId?: string
78
85
  overwrite?: boolean
79
86
  headers?: Record<string, string>
87
+ storageClass?: 'STANDARD'|'IA'|'ARCHIVE_FR'|'COLD_ARCHIVE'|'ARCHIVE'
80
88
  }
81
89
 
82
90