| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.jcraft.jsch.SftpException; |
| | | import com.panzhihua.applets.config.MinioUtil; |
| | | import com.panzhihua.applets.umf.UmfPayUtil; |
| | |
| | | File file1=new File(uuid+"_compress.jpg"); |
| | | String imageUrl = minioUtil.uploadFile(file1, uuid+"_compress.jpg"); |
| | | //上传完压缩图后把原图清理,防止文件服务器资源爆满 |
| | | minioUtil.removeMinio(fileName); |
| | | if (StrUtil.isNotBlank(fileName)){ |
| | | minioUtil.removeMinio(fileName); |
| | | } |
| | | return R.ok(imageUrl); |
| | | } catch (Exception e) { |
| | | log.error("上传照片失败【{}】", e.getMessage()); |