mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-24 18:14:22 +00:00
fix image extension
This commit is contained in:
parent
e2b42145e1
commit
ed4c65600c
@ -16,6 +16,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
from pathlib import Path
|
||||||
from typing import ClassVar, Self
|
from typing import ClassVar, Self
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@ -123,7 +124,7 @@ class Picture(SasFile):
|
|||||||
self.file.delete()
|
self.file.delete()
|
||||||
self.thumbnail.delete()
|
self.thumbnail.delete()
|
||||||
self.compressed.delete()
|
self.compressed.delete()
|
||||||
new_extension_name = self.name.removesuffix(extension) + "webp"
|
new_extension_name = str(Path(self.name).with_suffix(".webp"))
|
||||||
self.file = file
|
self.file = file
|
||||||
self.file.name = self.name
|
self.file.name = self.name
|
||||||
self.thumbnail = thumb
|
self.thumbnail = thumb
|
||||||
|
Loading…
Reference in New Issue
Block a user