25 lines
618 B
Python
25 lines
618 B
Python
```python
|
|
from fastapi import APIRouter, File, UploadFile
|
|
from typing import List
|
|
|
|
router = APIRouter()
|
|
|
|
@router.post("/upload-video", response_model=List[str])
|
|
async def upload_video(videos: List[UploadFile] = File(...)):
|
|
"""
|
|
Upload one or more video files.
|
|
|
|
Args:
|
|
videos (List[UploadFile]): The video files to be uploaded.
|
|
|
|
Returns:
|
|
List[str]: A list of file names for the uploaded videos.
|
|
"""
|
|
file_names = []
|
|
for video in videos:
|
|
file_name = video.filename
|
|
file_names.append(file_name)
|
|
# Implement file saving logic here
|
|
|
|
return file_names
|
|
``` |