评论

1 条评论

  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 324019:因机场网络异常,日志上传失败,请稍后重试。网络异常对象存储下发的STS有较大关系。 很抱歉,目前无法直接排查minio问题。您需要通过minio提供的SDK检验下发的STS是否准确。您可以通过以下代码检查STS是否准确。 public static final String ENDPOINT = "http://10.63.208.8:9000/"; //aws服务端点 public static final String REGION = "us-east-1"; //上传的bucket名 public static final String BUCKET = "cloud-bucket";  public static void main(String[] args)  throws IOException, NoSuchAlgorithmException, InvalidKeyException { //服务所在ip地址和端口 String accessKey = ""; String securityKey = ""; String securityToken = ""; int expire = 3000; ResponseDate responseDate = new ResponseDate(ZonedDateTime.now().plus(Duration.ofSeconds(expire))); Credentials credentials = new Credentials(accessKey, securityKey, securityToken, responseDate); StaticProvider staticProvider = new StaticProvider(credentials.accessKey(), credentials.secretKey(), credentials.sessionToken()); MinioClient minioClient = MinioClient.builder().endpoint(ENDPOINT).credentialsProvider(staticProvider).build(); File file = new File("E:\\\\01.log"); String objectName = "mx/100.log"; try { FileInputStream fileInputStream = new FileInputStream(file); minioClient.putObject(PutObjectArgs.builder().bucket(BUCKET) .object(objectName) .region(REGION) .stream(fileInputStream, fileInputStream.available(), -1).build()); } catch (Exception e) { e.printStackTrace(); } } 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    评论操作 固定链接

请先登录再写评论。