rewind the file to the begining
authorRodney Ewing <ewing.rj@gmail.com>
Wed, 14 Aug 2013 19:25:49 +0000 (12:25 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:21 +0000 (15:30 -0700)
mediagoblin/media_types/ascii/processing.py

index 82ee9cd746af029e21a05398410e6bb351189aa2..d69af1bff31fb1f8156b0d275838429ddcad5f6f 100644 (file)
@@ -87,6 +87,9 @@ class CommonAsciiProcessor(MediaProcessor):
                   d_charset,
                   self.charset))
 
+        # Rewind the file
+        orig_file.seek(0)
+
     def store_unicode_file(self):
         with file(self.orig_filename, 'rb') as orig_file:
             self._detect_charset(orig_file)