diff --git a/app.py b/app.py index 3b36bf3..58ab9cd 100644 --- a/app.py +++ b/app.py @@ -1,6 +1,7 @@ """ASCII Art Generator - FastAPI Web Application.""" import tempfile +import time import os from pathlib import Path @@ -23,6 +24,7 @@ app.mount("/static", StaticFiles(directory=BASE_DIR / "static"), name="static") templates = Jinja2Templates(directory=BASE_DIR / "templates") MAX_UPLOAD_SIZE = 10 * 1024 * 1024 # 10MB +CACHE_BUST = str(int(time.time())) ALLOWED_TYPES = {"image/png", "image/jpeg", "image/gif", "image/webp", "image/bmp"} @@ -33,6 +35,7 @@ async def index(request: Request): "palettes": list(PALETTES.keys()), "palette_previews": {k: v[:12] for k, v in PALETTES.items()}, "patterns": PATTERN_TYPES, + "cache_bust": CACHE_BUST, }) diff --git a/templates/index.html b/templates/index.html index 20593ed..7fcbb59 100644 --- a/templates/index.html +++ b/templates/index.html @@ -4,7 +4,7 @@ ASCII Art Generator - + @@ -127,6 +127,6 @@

Powered by Unicode · jeffemmett.com

- +