}
def.end();
}
byte[] plaintext = baos.toByteArray().toByteArray();
// 3. base64编码
return StringEscapeUtil.escapeURL(new String(Base64.encodeBase64(plaintext, false), "ISO-8859-1"));
} catch (Exception e) {
log.error("Failed to encode field attachment", e);