| | |
| | | String base64Str = java.util.Base64.getEncoder().encodeToString(fileBytes); |
| | | String imageSuffix = "." + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".") + 1); |
| | | String imageNames = System.currentTimeMillis() + IdUtil.simpleUUID() + imageSuffix; |
| | | String imageName = "hc/" + imageNames; |
| | | String imageName = "clothes/" + imageNames; |
| | | OssUtils.uploadFileWithBase64(base64Str, imageName); |
| | | String bucket_name = "https://excoin.oss-cn-hangzhou.aliyuncs.com"; |
| | | String url = bucket_name + "/" + imageName; |
| | |
| | | |
| | | String imageFuffix = ".jpg"; |
| | | String imageNames = System.currentTimeMillis() + IdUtil.simpleUUID() + imageFuffix; |
| | | String imageName = "hc/" + imageNames; |
| | | String imageName = "clothes/" + imageNames; |
| | | OssUtils.uploadFileWithBase64(base64Str, imageName); |
| | | String bucket_name ="https://excoin.oss-cn-hangzhou.aliyuncs.com"; |
| | | String url = bucket_name + "/" + imageName; |