Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,8 @@ UPLOAD_DIR.mkdir(exist_ok=True)
|
|
| 18 |
|
| 19 |
@app.post("/upload")
|
| 20 |
async def upload_file(file: UploadFile = File(...)):
|
| 21 |
-
|
|
|
|
| 22 |
with file_path.open("wb") as buffer:
|
| 23 |
shutil.copyfileobj(file.file, buffer)
|
| 24 |
|
|
|
|
| 18 |
|
| 19 |
@app.post("/upload")
|
| 20 |
async def upload_file(file: UploadFile = File(...)):
|
| 21 |
+
print(file)
|
| 22 |
+
file_path = file.filename
|
| 23 |
with file_path.open("wb") as buffer:
|
| 24 |
shutil.copyfileobj(file.file, buffer)
|
| 25 |
|