This is code written to understand how to work with the JQueryFileUpload tool using a Java servlet. In particular, the ability to restart a failed upload with having to retransmit the already transmitted parts. It is at the moment very much a test bed with some rather hacky bits in it.
It is assumed that File.lastModifiedDate and File name are, between them, enough to indicate if one file is the same as another file. Short of writing MD5 checksums that's about the best I can think of. This is really only an issue on a resumed multi-part upload. I've had to hack the lastModifedDate into the jQuery library. Not good :(
Currently an uploaded file will simply replace an existing file of the same name.
The assumption is made that the parts of a multi-part file are all sent in logical order. Is this correct?
The file post uses the servlet getParts method. But then assumes that there's only ever likely to be one part.
If something goes wrong, with a multipart upload, the server doesn't try to clean up. Hence the temporary directory can become littered with parts of files. But it is the temporary directory... Also, if a cancel is performed on a large multi-part file upload, the server has no idea and leaves the parts on the hard drive.
Currently in a large file the parts are assembled as they are uploaded. It would probably be more efficient to save the parts and then join them only once they had all been received... This of course would make the code to work out how much add already been sent in event of an upload failure more complicated.
Multiple users/browsers are now forced to log on and their log on name is used to name the directory they can write to. You wouldn't want to do this in real life: log on names might contain characters that don't map to the file system very well...
No real testing is done of the preconditions required to enable the application to run, hence leaving users to find out that something went wrong when they try to upload a file.
There are no tests. :(
Those are just the major oddities that I am aware of. More will come to light.