From 4ad1982d602b7e065af71e9a15bafdfd14182fbc Mon Sep 17 00:00:00 2001 From: Kumi Date: Thu, 7 Mar 2024 13:48:17 +0100 Subject: [PATCH] Add file name assignment to File.object.create in export_simple --- src/pix360_krpano/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pix360_krpano/modules.py b/src/pix360_krpano/modules.py index d2e0213..2a78dc5 100644 --- a/src/pix360_krpano/modules.py +++ b/src/pix360_krpano/modules.py @@ -186,7 +186,7 @@ class KRPanoConverter: cur = url[:-5] + i + url[-4:] res = HTTPRequest(cur).open() assert res.getcode() == 200 - fo = ContentFile(res.read()) + fo = ContentFile(res.read(), name="{i}.jpg") file = File.objects.create(conversion=self.conversion, file=fo, mime_type="image/jpeg") output += [file]