Spaces:
Runtime error
Runtime error
fix
Browse files- app/main.py +2 -2
app/main.py
CHANGED
@@ -40,9 +40,9 @@ def upload(files: list[UploadFile]):
|
|
40 |
|
41 |
try:
|
42 |
for file in files:
|
43 |
-
path = f"files/{file.filename}"
|
44 |
try:
|
45 |
-
|
|
|
46 |
shutil.copyfileobj(file.file, destination)
|
47 |
finally:
|
48 |
file.file.close()
|
|
|
40 |
|
41 |
try:
|
42 |
for file in files:
|
|
|
43 |
try:
|
44 |
+
file.file.seek(0)
|
45 |
+
with Path("files/").open("wb") as destination:
|
46 |
shutil.copyfileobj(file.file, destination)
|
47 |
finally:
|
48 |
file.file.close()
|