From f7f27311dba52ad50f3011fa1c6149fbbc2701de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Gr=C3=B6ger?= Date: Fri, 19 Nov 2021 22:04:33 +0100 Subject: [PATCH] [image] bigger filename size --- flaschengeist/models/image.py | 2 +- flaschengeist/plugins/pricelist/__init__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flaschengeist/models/image.py b/flaschengeist/models/image.py index 7cf9967..4c963e7 100644 --- a/flaschengeist/models/image.py +++ b/flaschengeist/models/image.py @@ -10,7 +10,7 @@ from ..database import db class Image(db.Model, ModelSerializeMixin): __tablename__ = "image" id: int = db.Column("id", Serial, primary_key=True) - filename_: str = db.Column(db.String(30), nullable=False) + filename_: str = db.Column(db.String(127), nullable=False) mimetype_: str = db.Column(db.String(30), nullable=False) thumbnail_: str = db.Column(db.String(127)) path_: str = db.Column(db.String(127)) diff --git a/flaschengeist/plugins/pricelist/__init__.py b/flaschengeist/plugins/pricelist/__init__.py index 9adace7..20bb30a 100644 --- a/flaschengeist/plugins/pricelist/__init__.py +++ b/flaschengeist/plugins/pricelist/__init__.py @@ -8,7 +8,7 @@ from flaschengeist import logger from flaschengeist.controller import userController from flaschengeist.controller.imageController import send_image, send_thumbnail from flaschengeist.plugins import Plugin -from flaschengeist.utils.decorators import login_required, extract_session +from flaschengeist.utils.decorators import login_required, extract_session, headers from flaschengeist.utils.HTTP import no_content from . import models @@ -738,6 +738,7 @@ def set_picture(identifier, current_session): @PriceListPlugin.blueprint.route("/drinks//picture", methods=["GET"]) +#@headers({"Cache-Control": "private, must-revalidate"}) def _get_picture(identifier): """Get Picture