getStorage().getConfig("max attach size"));
final MultipartParser mparser = new MultipartParser(req, size);
Part p;
while ((p = mparser.readNextPart()) != null) {
if (p.isFile()) {
final ByteStore bs = ByteStore.getBinaryFromIS(
((FilePart) p).getInputStream(), size);
bs.setName(((FilePart) p).getFileName());
bs.setContentType(getStorage().getMimeType(
((FilePart) p).getFileName()));
http_header.setContent(p.getName(), bs);
log.info("File name " + bs.getName());
log.info("Type " + bs.getContentType());
} else if (p.isParam()) {
http_header.setContent(p.getName(),
((ParamPart) p).getStringValue());
}