file uploads code (but disabled) including new submission handling