Update main.py
Browse files
main.py
CHANGED
@@ -88,10 +88,10 @@ app = FastAPI()
|
|
88 |
|
89 |
|
90 |
@app.post("/")
|
91 |
-
async def read_root(
|
92 |
-
try:
|
93 |
-
|
94 |
-
except error:
|
95 |
-
|
96 |
|
97 |
return {"filename": file.filename, "filepath": f"/app/{file.filename}"}
|
|
|
88 |
|
89 |
|
90 |
@app.post("/")
|
91 |
+
async def read_root( file: UploadFile = File(...)):
|
92 |
+
# try:
|
93 |
+
# json_data = await request.json()
|
94 |
+
# except error:
|
95 |
+
# print (error)
|
96 |
|
97 |
return {"filename": file.filename, "filepath": f"/app/{file.filename}"}
|