简要描述:
- 附件设置-远程设置
action
域名 /admin/system/remote
参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
type | 是 | int | 是否使用远程( 0: 不使用; 2: 阿里云; 4: 腾讯云 ) |
以下数据 | 需要加数组 | 如:alioss[key] | |
key | 是 | string | Access Key ID |
secret | 是 | string | Access Key Secret |
internal | 是 | int | 内网上传(1: 是; 0: 否) |
url | 否 | string | 自定义URL (默认URL不需要填写) |
以下数据从 | bucket | 接口里面取 | |
bucket | 是 | string | value |
loca_name | 是 | string | bucket loca_name (数据传隐藏值)) |
以下数据 | 需要加数组 | 如:cos[key] | |
appid | 是 | int | APPID |
secretid | 是 | string | SecretID |
secretkey | 是 | string | SecretKEY |
bucket | 是 | string | bucket |
local | 是 | string | bucket所在区域 |
url | 否 | string | 腾讯云支持用户自定义访问域名。注:url开头加http://或https://结尾不加 ‘/’例:http://abc.com |
返回示例:
正确时返回:
{
"result": 1,
"msg": '成功'
"data": {
type: 0,
alioss: {
key: "LTAIHmda0YLHAhFa",
secret: "NHiZfUjKDhaNR0vVHNRd0MT5iFKzsg",
bucket: "shanghubang2",
internal: "1",
url: "http://shanghubang2.oss-cn-shanghai.aliyuncs.com",
ossurl: "oss-cn-shanghai.aliyuncs.com"
},
cos: {
appid: "",
secretid: "",
secretkey: "",
bucket: "",
local: "",
url: ""
}
}
}
错误时返回:
{
"result": 0,
"msg": '失败'
"data": ""
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
type | int | 是否使用远程( 0: 不使用; 2: 阿里云; 4: 腾讯云 ) |
以下数据 | 如:alioss.key | |
key | string | Access Key ID |
secret | string | Access Key Secret |
bucket(下拉列表显示文字) | string | location_name |
bucket(下拉列表显示值) | string | value |
interna | int | 内网上传(1: 是; 0: 否) |
url | string | 自定义URL (默认URL不需要填写) |
以下数据 | 如:cos.appid | |
appid | int | APPID |
secretid | string | SecretID |
secretkey | string | SecretKEY |
bucket | string | bucket |
local | string | bucket所在区域 |
url | string | 腾讯云支持用户自定义访问域名。注:url开头加http://或https://结尾不加 ‘/’例:http://abc.com |
备注:
- 更多返回错误代码请看首页的错误代码描述