Guess a file attachment's content type if application/octet-stream.

Review Request #6016 — Created June 22, 2014 and submitted

Information

Review Board
release-2.0.x
328ea6d...

Reviewers

If a browser claims a file's content type is application/octet-stream,
get a second opinion by asking file --mime-type. This helps with some
browsers or server setups where that useless mimetype is being used,
preventing some files from being reviewable.

Faked the application/octet-stream mimetype on a file (by setting it just
before this conditional) and saw that the uploaded .c file was reviewable.
Before the conditional fix, it was uploaded with the application/octet-stream
mimetype.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/attachments/forms.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/attachments/forms.py
    
    
  2. 
      
david
  1. Ship It!

  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (cf601f7)
Loading...