Files
extreme 414b453acd Add S3 storage configuration and file management API endpoints
- Updated .env.example to include S3 configuration options.
- Added boto3 and python-multipart dependencies in pyproject.toml.
- Enhanced file management API with endpoints for uploading, downloading, and managing file metadata.
- Updated database models to associate files with various assets.
- Refactored schemas to include file ID references for asset images.
2026-03-12 18:18:48 +08:00

15 lines
314 B
Python

import asyncio
from app.core.storage import init_storage
async def _main() -> None:
"""初始化对象存储(例如创建 bucket)。"""
# boto3 是同步库,这里用线程池避免阻塞事件循环
await asyncio.to_thread(init_storage)
if __name__ == "__main__":
asyncio.run(_main())