Improve file uploading on newer Djangos.

Review Request #437 — Created July 7, 2008 and submitted

chipx86
Review Board SVN (deprecated)
trunk
reviewboard
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.)
david
  1. This looks good.  I'm assuming these changes won't break already-uploaded screenshots?
  2. /trunk/reviewboard/reviews/forms.py (Diff revision 2)
     
     
     
    Alphabetical, please.
  3. 
      
Loading...