使用显式GC节省内存 + 为book页添加响应式布局

This commit is contained in:
2024-04-15 16:59:38 +08:00
parent a434e44f7f
commit 0d68d58e3f
3 changed files with 76 additions and 53 deletions

View File

@@ -1,6 +1,6 @@
from flask import *
from flask import Blueprint
import db.file , file
import db.file , file, gc
api_Img_bp = Blueprint("api_Img_bp", __name__)
@@ -23,4 +23,5 @@ def img(bookid, index): # 图片接口
del data
response.headers.set("Content-Type", "image/Webp")
response.headers.set("Content-Disposition", "inline", filename=filename)
gc.collect()
return response