智慧农业后台管理
guoshilong
2022-11-08 72b971c98c46531064d74b68fc8fe8864ed0b544
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -226,10 +226,10 @@
   @PostMapping("put-files")
   public R putFiles(@RequestParam MultipartFile file) throws IOException, ServerException, InsufficientDataException, InternalException, InvalidResponseException, InvalidKeyException, NoSuchAlgorithmException, XmlParserException, ErrorResponseException {
      //填写你文件上传的地址以及相应信息
      String url = "http://61.131.136.25:2081";
      String access = "zhbaadmin";
      String secret = "zhbapassword";
      String bucket = "zhba";
      String url = "http://dev.jxpskj.com:9000";
      String access = "pskj";
      String secret = "pskj@2021";
      String bucket = "zhnc";
      MinioClient minioClient =
         MinioClient.builder()
            .endpoint(url)
@@ -258,7 +258,7 @@
            .headers(headers)
            .build());
      in.close();
      String urls = "http://61.131.136.25:2081/zhba/" + newName;
      String urls = TraceabilityCodeConfig.getUploadPath() + newName;
      //数据封装
      Map<String, Object> map = new HashMap<>(2);
      map.put("name", newName);