• 
      

    Fix an issue saving file attachments after guessing the mimetype.

    Review Request #5842 — Created May 19, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    3e299cb...

    Reviewers

    In order to guess the mimetype for a file attachment, we'd feed the
    contents to `file`. This worked fine, except that we never seeked the
    position back to 0, causing issues when trying to write the file. This
    really upset boto, breaking S3 support for any files we didn't have a
    mimetype for.

    The fix is simple. Just seek back to 0.

    Deployed this and posted without an error.

    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
          reviewboard/attachments/forms.py
        Ignored Files:
      
      
    2. 
        
    reviewbot
    1. This is a review from Review Bot.
        Tool: Pyflakes
        Processed Files:
          reviewboard/attachments/forms.py
        Ignored Files:
      
      
    2. 
        
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-2.0.x (2df62ce)