Spaces:
Sleeping
Sleeping
add .mov file format
Browse files
app.py
CHANGED
|
@@ -329,7 +329,7 @@ async def upload_video(background_tasks: BackgroundTasks, location: str = Form(N
|
|
| 329 |
raise HTTPException(status_code=400, detail="File is not a video.")
|
| 330 |
video_data = await file.read()
|
| 331 |
# Extract extension from uploaded file (fallback to .mp4)
|
| 332 |
-
|
| 333 |
ext = ext.lower() if ext.lower() in [".mp4", ".mov"] else ".mp4"
|
| 334 |
video_guid = str(uuid.uuid4())
|
| 335 |
lat, lon = get_gps_location(file.file)
|
|
|
|
| 329 |
raise HTTPException(status_code=400, detail="File is not a video.")
|
| 330 |
video_data = await file.read()
|
| 331 |
# Extract extension from uploaded file (fallback to .mp4)
|
| 332 |
+
ext = os.path.splitext(file.filename)[1]
|
| 333 |
ext = ext.lower() if ext.lower() in [".mp4", ".mov"] else ".mp4"
|
| 334 |
video_guid = str(uuid.uuid4())
|
| 335 |
lat, lon = get_gps_location(file.file)
|