Hi!
If I post a bigger Suneditor created doc value, than undertow save it to temp file. (Another problem, we want this file encrypt, perhaps can I make a PR for this?)...
If I have non-english characters in file than the reader can cut one character into two part and then concatenates this two part character into two character.
public static String readFile(InputStream file, Charset charSet) {
try (BufferedInputStream stream = new BufferedInputStream(file)) {
byte[] buff = new byte[1024];
StringBuilder builder = new StringBuilder();
int read;
while ((read = stream.read(buff)) != -1) {
builder.append(new String(buff, 0, read, charSet));
}
return builder.toString();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
It think it is a bug. But perhaps I use this feature bad. I can parhaps increase multipart treshold, but i think it is not the good way...
H.