diff --git a/chunked_upload/constants.py b/chunked_upload/constants.py index dbc4a49..2875839 100644 --- a/chunked_upload/constants.py +++ b/chunked_upload/constants.py @@ -1,4 +1,4 @@ -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ class http_status: diff --git a/chunked_upload/management/commands/delete_expired_uploads.py b/chunked_upload/management/commands/delete_expired_uploads.py index 2f5fc1d..e434bf9 100644 --- a/chunked_upload/management/commands/delete_expired_uploads.py +++ b/chunked_upload/management/commands/delete_expired_uploads.py @@ -2,7 +2,7 @@ from django.core.management.base import BaseCommand from django.utils import timezone -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from chunked_upload.settings import EXPIRATION_DELTA from chunked_upload.models import ChunkedUpload diff --git a/chunked_upload/views.py b/chunked_upload/views.py index b09d28f..21bb29f 100644 --- a/chunked_upload/views.py +++ b/chunked_upload/views.py @@ -146,7 +146,7 @@ def create_chunked_upload(self, save=False, **attrs): """ chunked_upload = self.model(**attrs) # file starts empty - chunked_upload.file.save(name='', content=ContentFile(''), save=save) + chunked_upload.file.save(name='tmp', content=ContentFile(''), save=save) return chunked_upload def is_valid_chunked_upload(self, chunked_upload): @@ -185,7 +185,6 @@ def _post(self, request, *args, **kwargs): self.is_valid_chunked_upload(chunked_upload) else: attrs = {'filename': chunk.name} - attrs.update(self.get_extra_attrs(request)) chunked_upload = self.create_chunked_upload(save=False, **attrs)