优化内存消耗 添加·单线程模式

This commit is contained in:
2024-04-16 11:48:04 +08:00
parent 0d68d58e3f
commit 30d99c1f08
5 changed files with 19 additions and 16 deletions

View File

@@ -9,7 +9,7 @@ api_Img_bp = Blueprint("api_Img_bp", __name__)
def img(bookid, index): # 图片接口
if request.cookies.get("islogin") is None:
return abort(403)
if db.file.searchByid(bookid) == "":
if len(db.file.searchByid(bookid)) == 0:
return abort(404)
# 设置响应类型为图片
data, filename = file.raedZip(bookid, index)