load info from stream in file has no info

This commit is contained in:
j 2015-02-03 23:20:16 +05:30
parent 83393ee385
commit 437391caf9

View file

@ -331,6 +331,10 @@ class File(models.Model):
stream.available = True stream.available = True
stream.info = {} stream.info = {}
stream.save() stream.save()
if self.info.keys() == ['extension']:
self.info.update(stream.info)
self.parse_info()
self.save()
return True, stream.media.size return True, stream.media.size
return save_chunk(stream, stream.media, chunk, offset, name, done_cb) return save_chunk(stream, stream.media, chunk, offset, name, done_cb)
return False, 0 return False, 0