From b6839a95050a18c77fe7c0d3e49f73deaf53b2a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 21 Jun 2016 13:44:00 +0200 Subject: [PATCH] [Backport] Enhancement#4356: Add gzipped dumps import support --- CHANGELOG.md | 1 - taiga/export_import/api.py | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b5f288a..0a337874 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,5 @@ # Changelog # - ## 2.1.0 Ursus Americanus (2016-05-03) ### Features diff --git a/taiga/export_import/api.py b/taiga/export_import/api.py index a8a1dddd..d8453ad5 100644 --- a/taiga/export_import/api.py +++ b/taiga/export_import/api.py @@ -318,6 +318,9 @@ class ProjectImporterViewSet(mixins.ImportThrottlingPolicyMixin, CreateModelMixi if not dump: raise exc.WrongArguments(_("Needed dump file")) + if dump.content_type == "application/gzip": + dump = gzip.GzipFile(fileobj=dump) + reader = codecs.getreader("utf-8") try: