fix stream uploads
This commit is contained in:
parent
14315455da
commit
fcbe552de3
1 changed files with 8 additions and 1 deletions
|
@ -324,7 +324,14 @@ class File(models.Model):
|
|||
stream, created = Stream.objects.get_or_create(
|
||||
file=self, resolution=resolution, format=format)
|
||||
name = stream.path(stream.name())
|
||||
return save_chunk(stream, stream.media, chunk, offset, name)
|
||||
|
||||
def done_cb():
|
||||
if done:
|
||||
stream.available = True
|
||||
stream.info = {}
|
||||
stream.save()
|
||||
return True, stream.media.size
|
||||
return save_chunk(stream, stream.media, chunk, offset, name, done_cb)
|
||||
return False, 0
|
||||
|
||||
def stream_resolution(self):
|
||||
|
|
Loading…
Reference in a new issue