阿里云OSS配置问题
最后的阿里云OSS的配置是
{
"access_key_id": "对应步骤一创建用户时的AccessKeyID",
"access_key_secret": "对应步骤一创建用户时的AccessKeySecret",
"region": "创建bucket选中的区域,如华东1(杭州)对应cn-hangzhou",
"bucket": "work-dji",
"arn": "对应步骤3中的ARN",
"role_session_name": "可以随意填写",
"provider": "如果使用阿里云,则填写ali"
}
阿里云OSS的配置是:
{
"bucket": "bucket_name",
"credentials": {
"access_key_id": "access_key_id",
"access_key_secret": "access_key_secret",
"expire": 3600,
"security_token": "security_token"
},
"endpoint": "https://oss-cn-hangzhou.aliyuncs.com",
"object_key_prefix": "b4cfaae6-bd9d-4cd0-8472-63b608c3c581",
"provider": "ali",
"region": "hz"
}
而且后面这个expire和
security_token不知道是怎么配置的。
配置阿里云的OSS,哪个是准确的。
-
谢谢回复。
又看到一个文档,是cloud api的demo
在application.yml中,并没有security_token,和cloud api的文档是不一致的:
oss:
enable: false
provider: ALIYUN # @see com.dji.sample.component.OssConfiguration.model.enums.OssTypeEnum
endpoint: https://oss-cn-hangzhou.aliyuncs.com
access-key: Please enter your access key.
secret-key: Please enter your secret key.
expire: 3600
region: Please enter your oss region. # cn-hangzhou
role-session-name: cloudApi
role-arn: Please enter your role arn. # acs:ram::123456789:role/stsrole
bucket: Please enter your bucket name.
object-dir-prefix: Please enter a folder name.
请先登录再写评论。
评论
3 条评论