Commit 4f134d45 authored by Ilya Simonov's avatar Ilya Simonov

revert 4ffdd452

parent 3c853a7d
import requests
import logging
from django.conf import settings
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 +28,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(chunk_size=4097152):
destination.write(chunk)
chunk_count += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment