add profile picture support and rearrange things to be slightly more sane
This commit is contained in:
parent
9148e2068f
commit
15e1018476
6 changed files with 100 additions and 10 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue