From: Alon Levy Date: Fri, 27 Dec 2013 01:00:02 +0000 (-0600) Subject: media_types/sniff_media: reset file back to 0 offset for actual copy. Required when... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7c6646a01a1b92ec8ccfef31f4b8060dd4a1628f;p=mediagoblin.git media_types/sniff_media: reset file back to 0 offset for actual copy. Required when not using celery --- diff --git a/mediagoblin/media_types/__init__.py b/mediagoblin/media_types/__init__.py index 80ae633b..2e392317 100644 --- a/mediagoblin/media_types/__init__.py +++ b/mediagoblin/media_types/__init__.py @@ -65,6 +65,7 @@ def sniff_media(media_file, filename): tmp_media_file = tempfile.NamedTemporaryFile() tmp_media_file.write(media_file.read()) tmp_media_file.seek(0) + media_file.seek(0) media_type = hook_handle('sniff_handler', tmp_media_file, filename) if media_type: