jschwab21 commited on
Commit
d1d0751
·
verified ·
1 Parent(s): a4f5085

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -48,7 +48,9 @@ class CustomTheme(Base):
48
  custom_theme = CustomTheme()
49
 
50
  def save_uploaded_file(file):
51
- file_path = f"uploaded_videos/{file.orig_name}"
 
 
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