Shouldn't be able to upload a partial photo

(Bug, Closed -> Fixed, Priority: High, Test Status: No automated tests yet , Reported By Justin du Coeur, )
Summary: See this page -- Xavier apparently had the upload fail mid-stream, and wound up with half a photo.
(Reported by Xavier.)
Not entirely clear how this is possible. My best guess is that the prelude to the photo contains all the metadata necessary for processing, and the system has no way of knowing a priori that it didn't get all the bytes.
Solution may be to send the expected size as part of the initial request (similar to how we now do for Import), and use that as a sanity-check to make sure we received everything?