Properties
getFileToken
get
File
Token
: ((fileType
: FileType, fileName
?: string, httpMethod
?: "POST" | "PUT", queryString
?: string, url
?: string) => Promise<IUploadAuth & { bos
: string; qiniu
: string; ossConfig
: string }>)Type declaration
- (fileType: FileType, fileName?: string, httpMethod?: "POST" | "PUT", queryString?: string, url?: string): Promise<IUploadAuth & { bos: string; qiniu: string; ossConfig: string }>
Parameters
Optional fileName: string
Optional httpMethod: "POST" | "PUT"
Optional queryString: string
Optional url: string
Returns Promise<IUploadAuth & { bos: string; qiniu: string; ossConfig: string }>
getFileUrl
get
File
Url
: ((fileType
: FileType, fileName
?: string, saveName
?: string, uploadRes
?: { isBosRes
: boolean; downloadUrl
: string }, serverType
?: UploadMethod) => Promise<{ downloadUrl
: string }>)Type declaration
- (fileType: FileType, fileName?: string, saveName?: string, uploadRes?: { isBosRes: boolean; downloadUrl: string }, serverType?: UploadMethod): Promise<{ downloadUrl: string }>
Parameters
Optional fileName: string
Optional saveName: string
Optional uploadRes: { isBosRes: boolean; downloadUrl: string }
isBosRes: boolean
downloadUrl: string
serverType: UploadMethod = UploadMethod.QINIU
Returns Promise<{ downloadUrl: string }>
customDomain
customDomain: string
Optional serverType
serverType?: number
Optional ossConfig
ossConfig?: string
Optional uploadServer
uploadServer?: string
Optional bosAddr
bosAddr?: string
获取存储服务鉴权信息
httpMethod
与queryString
为 STC S3 分段上传时的专属参数,STC 分段上传包含三个过程:httpMethod
值应为POST
,queryString
值为uploads
httpMethod
值应为PUT
,queryString
值为partNumber={partamNumer}&uploadId={uploadId}
httpMethod
值应为POST
,queryString
值为uploadId={uploadId}