Provide mimetype-based icons for file attachments.

Review Request #2369 — Created May 18, 2011 and submitted

Information

Review Board
master

Reviewers

Provide mimetype-based icons for file attachments.

When saving a file attachment, we now record the mimetype as reported by the
browser. The mimetype can then be used to return an icon representing that
file.

We have a handful of icons (all from the Tango set, which is in the public
domain). There's a mapping of mimetypes to icon types (based on Tango's)
that we use to map, say, zip files to the archive icon.
Along with my other changes, I verified that various files I uploaded had
the icon I expected.

Unit tests pass.
david
  1. 
      
  2. reviewboard/attachments/mimetypes.py (Diff revision 1)
     
     
    Where is this list from?
    1. It's based on the mimetype mappings (the symlinks) generated as part of the Tango icon set, plus some others I hit while uploading things.
    2. Okay, ship it.
  3.