/
index.d.ts
44 lines (39 loc) · 1.33 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
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
42
43
44
import type { PluginOptions, BasePlugin, UppyFile } from '@uppy/core'
type MaybePromise<T> = T | Promise<T>
export interface AwsS3Part {
PartNumber?: number
Size?: number
ETag?: string
}
export interface AwsS3MultipartOptions extends PluginOptions {
companionHeaders?: { [type: string]: string }
companionUrl?: string
companionCookiesRule?: string
getChunkSize?: (file: UppyFile) => number
createMultipartUpload?: (
file: UppyFile
) => MaybePromise<{ uploadId: string; key: string }>
listParts?: (
file: UppyFile,
opts: { uploadId: string; key: string }
) => MaybePromise<AwsS3Part[]>
prepareUploadParts?: (
file: UppyFile,
partData: { uploadId: string; key: string; parts: Array<{ number: number, chunk: Blob }> }
) => MaybePromise<{ presignedUrls: { [k: number]: string }, headers?: { [k: string]: string } }>
abortMultipartUpload?: (
file: UppyFile,
opts: { uploadId: string; key: string }
) => MaybePromise<void>
completeMultipartUpload?: (
file: UppyFile,
opts: { uploadId: string; key: string; parts: AwsS3Part[] }
) => MaybePromise<{ location?: string }>
timeout?: number
limit?: number
retryDelays?: number[] | null
}
declare class AwsS3Multipart extends BasePlugin<
AwsS3MultipartOptions
> {}
export default AwsS3Multipart