Spaces:
Runtime error
Runtime error
| import os | |
| import tempfile | |
| def save_uploaded_file(uploaded_file): | |
| with tempfile.NamedTemporaryFile(delete=False, suffix=os.path.splitext(uploaded_file.name)[1]) as temp_file: | |
| temp_file.write(uploaded_file.getvalue()) | |
| return temp_file.name |