1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-07 18:54:03 +00:00

Fix cover upload url with spaces at the end

Support image/jpg as upload format mimetype, remove redundant check of mimetype
This commit is contained in:
Ozzie Isaacs
2022-04-12 19:33:00 +02:00
parent 028e6855a7
commit 83b99fcb1a
2 changed files with 17 additions and 15 deletions

View File

@@ -810,7 +810,7 @@ def edit_book(book_id):
if to_save["cover_url"].endswith('/static/generic_cover.jpg'):
book.has_cover = 0
else:
result, error = helper.save_cover_from_url(to_save["cover_url"], book.path)
result, error = helper.save_cover_from_url(to_save["cover_url"].strip(), book.path)
if result is True:
book.has_cover = 1
modify_date = True