From 543942e34d15ee465cb0c9edf2bbc7e981c94afe Mon Sep 17 00:00:00 2001 From: rokdd Date: Wed, 5 Jan 2022 19:28:23 +0100 Subject: [PATCH] Update static-libs-download.py --- .../management/commands/static-libs-download.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_auto_static_libs/management/commands/static-libs-download.py b/django_auto_static_libs/management/commands/static-libs-download.py index 48df994..458db52 100644 --- a/django_auto_static_libs/management/commands/static-libs-download.py +++ b/django_auto_static_libs/management/commands/static-libs-download.py @@ -67,7 +67,7 @@ def handle(self, *args, **kwargs): for rfile in r: #print(rfile.headers) #rfile.headers.get("content-disposition").split("filename=")[1] - z.writestr(os.path.basename(rfile.url),io.BytesIO(rfile.content)) + z.writestr(os.path.basename(rfile.url),rfile.content) elif isinstance(r,requests.Response) and r.headers.get('content-type') == "application/zip": z = zipfile.ZipFile(io.BytesIO(r.content)) else: