}
} else if (ctypelc.startsWith("text/")) {
String charset = getCharset(ctype);
if (charset == null) {
final Configuration conf = desktop.getWebApp().getConfiguration();
final CharsetFinder chfd = conf.getUploadCharsetFinder();
if (chfd != null)
charset = chfd.getCharset(ctype,
fi.isInMemory() ?
new ByteArrayInputStream(fi.get()):
fi.getInputStream());
if (charset == null)
charset = conf.getUploadCharset();