Improve file uploading on newer Djangos.
Review Request #437 — Created July 6, 2008 and submitted
|Review Board SVN (deprecated)|
Migrate file uploading support to use the newer ImageField and FileField, as well as the new uploading classes in Django. This ends up cleaning up our code a little bit. We also now upload images to /year/month/day directories. This also changes unit tests to write files to a temporary directory so we don't litter the actual upload directory.
Verified that I could still upload diffs and images without problems. Also verified that the internal validation of correct image types works. This passed all unit tests (well, as well as it did before -- there's some issue with writing 0-byte images to disk, and I think it's a Django bug. Still investigating.)