Utility functions for ali-oss
- Description:
Utility functions for ali-oss
- Source:
Methods
(static) deleteRemotePathListFromAliOSS(payload) → {Promise.<module:OSS~ReturnAliDeleteRemotePathList>}
- Description:
Delete files
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
module:OSS~ParamsAliDeleteRemotePathList |
Returns:
- Type
- Promise.<module:OSS~ReturnAliDeleteRemotePathList>
(static) getClientFromAliOSS(payload) → {module:OSS~AliOSSClient}
- Description:
Get Ali OSS client
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
module:OSS~ParamsAliOSSConstructor |
Returns:
- Type
- module:OSS~AliOSSClient
(static) getObjectUrlFromAliOSS(payload) → {string}
- Description:
Get object url
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
module:OSS~ParamsAliOSSGetObjectUrl |
Returns:
- Type
- string
(static) listFilesFromAliOSS(payload) → {Promise.<Array.<module:OSS~AliObjectMeta>>}
- Description:
List files
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
module:OSS~ParamsAliOSSListFiles |
Returns:
- Type
- Promise.<Array.<module:OSS~AliObjectMeta>>
(static) uploadDirToAliOSS(payload) → {Promise.<Array.<module:OSS~ReturnUploadLocalFile>>}
- Description:
Upload directory to aliyun oss
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
module:OSS~ParamsUploadDirToAliOSS |
Returns:
- Type
- Promise.<Array.<module:OSS~ReturnUploadLocalFile>>
(static) uploadLocalFileToAliOSS(payload) → {Promise.<module:OSS~ReturnUploadLocalFile>}
- Description:
Upload local file to aliyun oss
- Source:
Parameters:
Name | Type | Description |
---|---|---|
payload |
module:OSS~ParamsUploadLocalFile |
Returns:
- Type
- Promise.<module:OSS~ReturnUploadLocalFile>
Type Definitions
AliOSSClient
- Source:
Type:
- module:ali-oss
AliObjectMeta
- Source:
Type:
- module:ali-oss~RequestOptions
ParamsAliDeleteRemotePathList
- Source:
Properties:
Name | Type | Description |
---|---|---|
client |
module:OSS~AliOSSClient | |
remotePathList |
Array.<string> |
Type:
- Object
ParamsAliOSSConstructor
- Source:
Properties:
Name | Type | Description |
---|---|---|
accessKeyId |
string | |
accessKeySecret |
string | |
bucket |
string | |
region |
string |
Type:
- Object
ParamsAliOSSGetObjectUrl
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
client |
module:OSS~AliOSSClient | ||
key |
string | ||
baseUrl |
string |
<optional> |
一般为CDN加速域名,以http(s)开头 |
Type:
- Object
ParamsAliOSSListFiles
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
client |
module:OSS~AliOSSClient | |||
prefix |
string | |||
maxKeys |
number |
<optional> |
100
|
max objects, default is 100, limit to 1000, set it to 0 or ignore it if you want to list all files |
options |
module:OSS~AliRequestOptions |
<optional> |
Type:
- Object
ParamsUploadDirToAliOSS
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
client |
module:OSS~AliOSSClient | |||
localPath |
string | |||
ignorePathList |
Array.<string> | |||
recursive |
boolean |
<optional> |
false
|
Type:
- Object
ParamsUploadLocalFile
- Source:
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
client |
module:OSS~AliOSSClient | ||
localPath |
string | ||
remotePath |
string | ||
baseUrl |
string |
<optional> |
|
config |
module:ali-oss~PutObjectOptions |
<optional> |
Type:
- Object
ReturnAliDeleteRemotePathList
- Source:
Properties:
Name | Type | Description |
---|---|---|
successItems |
Array.<string> | |
failItems |
Array.<string> |
Type:
- Object
ReturnUploadLocalFile
- Source:
Properties:
Name | Type | Description |
---|---|---|
name |
string | |
url |
string | |
cdnUrl |
string |
Type:
- Object