正在上传图片(0/1)

大疆机场2连接minIO临时凭证失败,无法上传图片

 0
手机看帖 0 38
@Override
    public CredentialsDTO getCredentials() {
        try {
            AssumeRoleProvider provider = new AssumeRoleProvider(OssConfiguration.endpoint, OssConfiguration.accessKey,
                    OssConfiguration.secretKey, Math.toIntExact(OssConfiguration.expire),
                    null, OssConfiguration.region, null, null, null, null);
            return new CredentialsDTO(provider.fetch(), OssConfiguration.expire);
        } catch (NoSuchAlgorithmException e) {
            log.debug("Failed to obtain sts.");
            e.printStackTrace();
        }
        return null;
    }
yml 配置文件:oss:
  enable: true
  provider: minio
  endpoint: http://*********:9000
  access-key: ****
  secret-key: ***
  bucket: cloud-bucket
  expire: 3600
之前使用阿里的OSS可以正常图传,后切换到minIO以后,第一次还正常,但是换了一台机场2以后就没办法图传了,在上述代码中就一直报错 failed to obtain sts.
评论
上传
你需要登录之后才能回帖    登录 | 注册
收藏 点赞 评论
分享至:
回复:
上传
取消 评论
快速回复 返回顶部 返回列表