Spaces:
Running on T4
Running on T4
Download backend/app/modules/uploads/controller.py from modventures/baseball-engine: direct link, hf CLI and curl.
- Browser
- Download file 568 Bytes
-
https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/backend/app/modules/uploads/controller.py
- Command line
-
hf download hf://spaces/modventures/baseball-engine/backend/app/modules/uploads/controller.py
-
curl -L -o controller.py https://huggingface.co/spaces/modventures/baseball-engine/resolve/main/backend/app/modules/uploads/controller.py
568 Bytes
| """D1: presigned upload targets for the clip and its thumbnail.""" | |
| from fastapi import APIRouter | |
| from app.core.dependencies import CurrentAccount, Db, Storage | |
| from app.modules.uploads.schemas import UploadIn, UploadOut | |
| from app.modules.uploads.service import UploadService | |
| router = APIRouter(prefix="/v1", tags=["uploads"]) | |
| async def create_upload(body: UploadIn, account: CurrentAccount, db: Db, storage: Storage) -> UploadOut: | |
| return await UploadService(db, storage).create(account, body) | |