0.1 release
This commit is contained in:
parent
7812242f8c
commit
cceee36838
@ -14,10 +14,10 @@ def root():
|
|||||||
|
|
||||||
@app.post("/uploadfile/", response_model=HTMLBook)
|
@app.post("/uploadfile/", response_model=HTMLBook)
|
||||||
async def create_upload_file(file: UploadFile = File(...)):
|
async def create_upload_file(file: UploadFile = File(...)):
|
||||||
if file.filename.endswith(".epub"):
|
if file.filename.endswith(".fb2"):
|
||||||
content = await epub2html(file.file)
|
|
||||||
elif file.filename.endswith(".fb2"):
|
|
||||||
content = await fb22html(file.file)
|
content = await fb22html(file.file)
|
||||||
|
# elif file.filename.endswith(".epub"):
|
||||||
|
# content = await epub2html(file.file)
|
||||||
else:
|
else:
|
||||||
raise HTTPException(status_code=415, detail="Error! Unsupported file type")
|
raise HTTPException(status_code=415, detail="Error! Unsupported file type")
|
||||||
return content
|
return content
|
||||||
|
Loading…
x
Reference in New Issue
Block a user