0.1 release

This commit is contained in:
Dmitriy Shishkov 2021-07-02 05:23:33 +05:00
parent 7812242f8c
commit cceee36838
No known key found for this signature in database
GPG Key ID: 14358F96FCDD8060

View File

@ -14,10 +14,10 @@ def root():
@app.post("/uploadfile/", response_model=HTMLBook)
async def create_upload_file(file: UploadFile = File(...)):
if file.filename.endswith(".epub"):
content = await epub2html(file.file)
elif file.filename.endswith(".fb2"):
if file.filename.endswith(".fb2"):
content = await fb22html(file.file)
# elif file.filename.endswith(".epub"):
# content = await epub2html(file.file)
else:
raise HTTPException(status_code=415, detail="Error! Unsupported file type")
return content