]> git.parisson.com Git - telemeta.git/commitdiff
Bugfix, finally fixes #200
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 4 Jun 2018 10:42:05 +0000 (12:42 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 4 Jun 2018 10:42:05 +0000 (12:42 +0200)
telemeta/views/core.py

index 8c6e4c5a20253db1bf021a02b1f74186532c7b9a..18869dd112ea196765df445a674de3d1d35a54d6 100644 (file)
@@ -103,7 +103,7 @@ def serve_media(media_path, content_type="", buffering=True, streaming=False):
         try:
             response = FileResponse(open(media_path, 'rb'))
         except:    
-            response = StreamingHttpResponse(stream_from_file(filename), content_type=content_type)
+            response = StreamingHttpResponse(stream_from_file(media_path), content_type=content_type)
         filename = os.path.basename(media_path)
         if not streaming:
             response['Content-Disposition'] = 'attachment; ' + 'filename=' + filename