mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Add API endpoint to upload images
This commit is contained in:
@ -764,6 +764,10 @@ Welcome to the wiki page!
|
||||
]
|
||||
)
|
||||
|
||||
# Upload folder
|
||||
SithFile.objects.create(name="upload", owner=root)
|
||||
(settings.MEDIA_ROOT / "upload").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
def _create_profile_pict(self, user: User):
|
||||
path = self.SAS_FIXTURE_PATH / "Family" / f"{user.username}.jpg"
|
||||
file = resize_image(Image.open(path), 400, "WEBP")
|
||||
|
Reference in New Issue
Block a user