Spaces:
Sleeping
Sleeping
File size: 236 Bytes
02109ec |
1 2 3 4 5 6 7 8 9 10 11 |
import shutil
from fastapi import UploadFile
def write_file_env(path: str, file: UploadFile):
# if os.path.isfile(env_path):
# os.remove(env_path)
with open(path, 'w+b') as f:
shutil.copyfileobj(file.file, f)
|