fix type of direct uploads

This commit is contained in:
j 2012-11-16 02:50:10 +01:00
parent fafff73f8d
commit 1bc21588a6

View file

@ -206,6 +206,14 @@ def addFile(request):
i.save()
f = models.File(oshash=oshash, item=i)
f.path = data.get('filename', 'Untitled')
extension = f.path.split('.')
if len(extension) > 1:
extension = extension[-1]
else:
extension = 'webm'
f.path_info = {
'extension': extension
}
f.selected = True
f.info = data['info']
f.save()