Add file name assignment to File.object.create in export_simple

This commit is contained in:
Kumi 2024-03-07 13:48:17 +01:00
parent e7a1e5a440
commit 4ad1982d60
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -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]