Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,6 +29,9 @@ def upload():
|
|
| 29 |
if video.filename == '':
|
| 30 |
return 'No selected file', 400
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
filename = f"{uuid.uuid4()}.mp4"
|
| 33 |
filepath = os.path.join(app.config['UPLOAD_FOLDER'], filename)
|
| 34 |
video.save(filepath)
|
|
|
|
| 29 |
if video.filename == '':
|
| 30 |
return 'No selected file', 400
|
| 31 |
|
| 32 |
+
# Ensure upload folder exists
|
| 33 |
+
os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
|
| 34 |
+
|
| 35 |
filename = f"{uuid.uuid4()}.mp4"
|
| 36 |
filepath = os.path.join(app.config['UPLOAD_FOLDER'], filename)
|
| 37 |
video.save(filepath)
|