forked from 0x2620/pandora
fix type of direct uploads
This commit is contained in:
parent
fafff73f8d
commit
1bc21588a6
1 changed files with 8 additions and 0 deletions
|
@ -206,6 +206,14 @@ def addFile(request):
|
||||||
i.save()
|
i.save()
|
||||||
f = models.File(oshash=oshash, item=i)
|
f = models.File(oshash=oshash, item=i)
|
||||||
f.path = data.get('filename', 'Untitled')
|
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.selected = True
|
||||||
f.info = data['info']
|
f.info = data['info']
|
||||||
f.save()
|
f.save()
|
||||||
|
|
Loading…
Reference in a new issue