forked from 0x2620/pandora
remove failed transcodes, fix reuploading the same file via direct upload
This commit is contained in:
parent
2c01974625
commit
3064785b3e
4 changed files with 16 additions and 3 deletions
|
|
@ -310,6 +310,12 @@ def direct_upload(request):
|
|||
else:
|
||||
file, created = models.File.objects.get_or_create(oshash=oshash)
|
||||
if file.editable(request.user):
|
||||
#remove previous uploads
|
||||
if not created:
|
||||
file.streams.all().delete()
|
||||
file.delete_frames()
|
||||
if file.item.rendered and file.selected:
|
||||
Item.objects.filter(id=file.item.id).update(rendered=False)
|
||||
file.uploading = True
|
||||
file.save()
|
||||
upload_url = request.build_absolute_uri('/api/upload/direct/?id=%s' % file.oshash)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue