I have a rather long backlog of journal posts.. so this post is actually a few weeks old. I bumped into the following problem..
In a web based file manager (yes, I know, doom doom doom doom), I had a javascript popup (again, I know, doom doom doom doom) with a upload form. The submit button submitted the form and closed the popup. It turned out that the closing of the popup caused the uploading procedure to cut off. Uploading worked fine for some files and failed for others. After moving the upload form away from the popup, everything worked fine.
Let this be a lesson to all: Don't mix funky javascript with funky javascript and file uploading! :D