X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/c48ff2d3e64065793c24cfb8ae151f02b8e6646a..94e92455b60f276f2a1a5b55de5e6b060687f396:/src/fileupload/views.py?ds=inline diff --git a/src/fileupload/views.py b/src/fileupload/views.py index 56a198ed..23fbc3bb 100644 --- a/src/fileupload/views.py +++ b/src/fileupload/views.py @@ -98,7 +98,7 @@ class UploadView(FormView): return super(UploadView, self).dispatch(request, *args, **kwargs) def get(self, request, *args, **kwargs): - if request.is_ajax(): + if request.headers.get('x-requested-with') == 'XMLHttpRequest': files = [] path = self.get_safe_path() if os.path.isdir(path):