better ordering for tags
[redakcja.git] / apps / fileupload / views.py
index 35e0a7a..c7b9318 100644 (file)
@@ -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)