mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
17 lines
373 B
Python
17 lines
373 B
Python
from uuid import uuid4
|
|
|
|
from src.services.utils.upload_content import upload_content
|
|
|
|
|
|
async def upload_org_logo(logo_file, org_uuid):
|
|
contents = logo_file.file.read()
|
|
name_in_disk = f"{uuid4()}.{logo_file.filename.split('.')[-1]}"
|
|
|
|
await upload_content(
|
|
"logos",
|
|
org_uuid,
|
|
contents,
|
|
name_in_disk,
|
|
)
|
|
|
|
return name_in_disk
|