From 7c6646a01a1b92ec8ccfef31f4b8060dd4a1628f Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 26 Dec 2013 19:00:02 -0600 Subject: [PATCH] media_types/sniff_media: reset file back to 0 offset for actual copy. Required when not using celery --- mediagoblin/media_types/__init__.py | 1 + 1 file changed, 1 insertion(+) 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: -- 2.25.1