X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c96b1bfa73a18c8647fdc7ec3988b85961ea2c5f..eb769f1b951951ebd6cb55060f2f61a8c25d5aac:/apps/fileupload/views.py diff --git a/apps/fileupload/views.py b/apps/fileupload/views.py index 35e0a7ae..c7b93187 100644 --- a/apps/fileupload/views.py +++ b/apps/fileupload/views.py @@ -11,6 +11,8 @@ from django.http import HttpResponse, Http404 from django.utils.decorators import method_decorator from django.views.decorators.vary import vary_on_headers from django.views.generic import FormView +from unidecode import unidecode + from .forms import UploadForm @@ -139,6 +141,7 @@ class UploadView(UploadViewMixin, FormView): os.makedirs(path) data = [] for f in flist: + f.name = unidecode(f.name) with open(self.get_safe_path(f.name), 'w') as destination: for chunk in f.chunks(): destination.write(chunk)