Create /upload_token endpoint

This commit is contained in:
IgorVolochay
2026-01-03 17:37:37 +03:00
parent 325a9d9ff1
commit ecd3d79f2b
5 changed files with 57 additions and 18 deletions
+2 -3
View File
@@ -2,7 +2,6 @@ import os
import asyncio
from anyio import Condition
from dotenv import load_dotenv
from aiobotocore.session import get_session
@@ -75,9 +74,9 @@ class S3Worker:
ExpiresIn=expires_in,
)
s3_worker = S3Worker()
async def test_run():
async with S3Worker() as worker:
async with s3_worker as worker:
await worker.upload_file("test.txt", b"hello")
file = await worker.download_file("test.txt")
file_text = await file["Body"].read()