Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,7 +48,9 @@ class CustomTheme(Base):
|
|
48 |
custom_theme = CustomTheme()
|
49 |
|
50 |
def save_uploaded_file(file):
|
51 |
-
|
|
|
|
|
52 |
with open(file_path, "wb") as f:
|
53 |
f.write(file.read())
|
54 |
return file_path
|
|
|
48 |
custom_theme = CustomTheme()
|
49 |
|
50 |
def save_uploaded_file(file):
|
51 |
+
upload_dir = "uploaded_videos"
|
52 |
+
os.makedirs(upload_dir, exist_ok=True)
|
53 |
+
file_path = os.path.join(upload_dir, file.name)
|
54 |
with open(file_path, "wb") as f:
|
55 |
f.write(file.read())
|
56 |
return file_path
|