| | |
| | | for (String str : list) { |
| | | String password = str.substring(0, 6); |
| | | String fileName = str.substring(6, str.length()); |
| | | InputStream input = FtpApche.downloadFileFromDailyDir(str); |
| | | System.out.println("file name is:" + fileName); |
| | | log.error("file name is:" + fileName); |
| | | InputStream input = FtpApche.downloadFileFromDailyDir(str, this.ftpConfig); |
| | | byte[] fileBytesByName = FtpApche.getFileBytesByName(input); |
| | | OssClient storage = OssFactory.instance(); |
| | | MockMultipartFile mockMultipartFile = new MockMultipartFile(fileName, fileName, fileName.substring(14, fileName.length()), input); |
| | | String contentType = fileName.length() >= 14 ? fileName.substring(14) : "application/octet-stream"; |
| | | MockMultipartFile mockMultipartFile = new MockMultipartFile(fileName, fileName, contentType, input); |
| | | UploadResult uploadResult = storage.uploadSuffix2(fileBytesByName, getPath(fileName), "multipart/form-data; charset=ISO-8859-1"); |
| | | FtpApche.deleteFile(str); |
| | | buildResultEntity(fileName, fileName.substring(14, fileName.length()), "minio", uploadResult, (MultipartFile)mockMultipartFile, password, fileBytesByName); |