File size: 337 Bytes
a755c90
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import streamlit as st
import os

def save_uploaded_file(uploaded_file):
    try:
        file_path = os.path.join('uploaded', uploaded_file.name)
        with open(file_path, 'wb') as f:
            f.write(uploaded_file.getvalue())
        return file_path
    except Exception as e:
        st.error(f"Error: {e}")
        return None