akbertram/activityinfo — comment on commit 6085eb5e3e41198b4c00de8f9223032fc89b62aa
File: sigmah/src/main/java/org/sigmah/server/attachment/ServletAttachmentUpload.java line 64
By akbertram:

This can cause problems if the file is binary.

You want to do:
File tempFile = File.createTemporaryFile();
FileOutputStream fos = new FileOutputStream(tempFile);
ByteStreams.copy(req.getInputStream(), fos);
fos.close()

but you will need to do something different to parse the multipart encoding-- again i suggest using apache-uploads or another library.