fixes after the refactor

Signed-off-by: lucasew <lucas59356@gmail.com>
This commit is contained in:
lucasew 2024-01-23 12:59:52 -03:00
parent d2c5f3d591
commit 8da06f5e74
3 changed files with 8 additions and 7 deletions

View file

@ -111,12 +111,12 @@ def upload(file: UploadFile = File(...)):
file_path = f"{UPLOAD_DIR}/{file.filename}"
# Save file in chunks
with file_path.open("wb+") as f:
with open(file_path, "wb+") as f:
for chunk in file.file:
f.write(chunk)
def file_process_stream():
total_size = os.path.getsize(str(file_path))
total_size = os.path.getsize(file_path)
chunk_size = 1024 * 1024
try:
with open(file_path, "rb") as f: