|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.ruoyi.flowable.domain.vo;
|
|
|
|
package com.ruoyi.flowable.domain.vo;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.img.ImgUtil;
|
|
|
|
import cn.hutool.core.img.ImgUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.io.FileUtil;
|
|
|
|
import lombok.Data;
|
|
|
|
import lombok.Data;
|
|
|
|
import lombok.experimental.Accessors;
|
|
|
|
import lombok.experimental.Accessors;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
@ -23,8 +24,8 @@ public class AttachmentInfoVO {
|
|
|
|
this.isImg = false;
|
|
|
|
this.isImg = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setBase64ByFile(String path, String type) {
|
|
|
|
public void parseImageBase64(String path, String type) {
|
|
|
|
if (this.isImg) {
|
|
|
|
if (this.isImg && FileUtil.exist(path)) {
|
|
|
|
this.base64 = ImgUtil.toBase64(ImgUtil.read(path), type);
|
|
|
|
this.base64 = ImgUtil.toBase64(ImgUtil.read(path), type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|