0.1 release
This commit is contained in:
parent
7812242f8c
commit
cceee36838
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user