backoffice / app /util /file_util.py
Jhon Alexander Alvarez Casas
update logic and new method for auth_cognito
02109ec
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)