Rewrote file upload in java.