add profile picture support and rearrange things to be slightly more sane

This commit is contained in:
CEF Server 2024-05-19 23:22:40 +00:00
parent 9148e2068f
commit 15e1018476
6 changed files with 100 additions and 10 deletions

View file

@ -1,5 +1,8 @@
import hashlib
import re
import config
from minio import Minio
from fastapi import UploadFile
@ -13,3 +16,9 @@ async def SHA256(f: UploadFile) -> str:
sha.update(data)
await f.seek(0)
return sha.hexdigest()
minioClient = Minio(
config.MINIO_ADDR,
access_key=config.MINIO_ACCESS_KEY,
secret_key=config.MINIO_SECRET_KEY,
)