diff --git a/apps/core/__pycache__/utils.cpython-39.pyc b/apps/core/__pycache__/utils.cpython-39.pyc index 11496871e6b303366c7f91c63f9d53f575bc9d62..373b6a9d214ce70dd9e42840efc68c52f4bbec29 100644 Binary files a/apps/core/__pycache__/utils.cpython-39.pyc and b/apps/core/__pycache__/utils.cpython-39.pyc differ diff --git a/apps/core/utils.py b/apps/core/utils.py index a38648bc1a6b8a8a408e588fa36f73e6f7ac600a..590c21fd8520bbb58b92ae821ef7dc0075170fb4 100644 --- a/apps/core/utils.py +++ b/apps/core/utils.py @@ -4,7 +4,6 @@ import logging from django.contrib.contenttypes.models import ContentType from moviepy.editor import VideoFileClip -from wsgiref.util import FileWrapper from .models import Video, Playlist, TagToObject, DYNAMIC, PlaylistVideo @@ -28,10 +27,7 @@ def download_file(url): def handle_uploaded_file(f, file_name): chunk_count = 0 with open(file_name, 'wb+') as destination: - wrapper = FileWrapper(f, blksize=5000) - - # for chunk in f.chunks(): - for chunk in wrapper: + for chunk in f.chunks(): destination.write(chunk) chunk_count += 1