]> git.parisson.com Git - teleforma.git/commitdiff
fix media url
authorGuillaume Pellerin <guillaume.pellerin@free.fr>
Wed, 24 Apr 2024 08:29:51 +0000 (10:29 +0200)
committerGuillaume Pellerin <guillaume.pellerin@free.fr>
Wed, 24 Apr 2024 08:29:51 +0000 (10:29 +0200)
teleforma/views/core.py

index 085461e3e60be7291ba06574070d5ef8098810bf..e261d81333666177f75f34b09c24e43905e8f27e 100644 (file)
@@ -760,7 +760,7 @@ class MediaTranscodedView(CourseAccessMixin, DetailView):
             reverse("teleforma-media-transcoded",
                 kwargs={"period_id": period_id, "pk": media.id}))
         if get_access(media, courses) and referer == media_detail_url:
-            return serve_media(media.file.path, content_type=media.mime_type, streaming=streaming)
+            return serve_media(media.file, content_type=media.mime_type, streaming=streaming)
         else:
             raise Http404("You don't have access to this media.")