| | |
| | | @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) |
| | |
| | | .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); |