Use group permissions

This commit is contained in:
2025-04-09 23:24:15 +02:00
parent 744223b76f
commit 3e61560875
5 changed files with 10 additions and 9 deletions

View File

@ -1148,15 +1148,15 @@ class QuickUploadImage(models.Model):
identifier = str(uuid4())
name = Path(image.name).stem[: cls.IMAGE_NAME_SIZE - 1]
file = File(convert_image(image), name=f"{identifier}.webp")
image = Image.open(file)
width, height = Image.open(file).size
return cls.objects.create(
uuid=identifier,
name=name,
image=file,
uploader=uploader,
width=image.width,
height=image.height,
width=width,
height=height,
size=file.size,
)