Hi Mathy,
Error 400 shows that your session was closed. Is this a custom application or a standard one? Have you tried to use class cl_gui_frontend_services to upload the file? (It is the only supported way to upload files via WEBGUI).
You can use Fiddler to identify whether a command to close the session is being sent to the backend. You can also use a Java trace (level 5) to find more information about what is happening in the applet side.
Please also note that soon the Java applet will be deprecated, as some browsers will no longer support NPAPI.
I hope this helps,
Cris