From eda09669f8582db067b53ff0f712b9790509bc46 Mon Sep 17 00:00:00 2001 From: jabuxas Date: Wed, 16 Oct 2024 23:20:14 -0300 Subject: [PATCH] feat: make /last also use new template --- handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handlers.go b/handlers.go index 40fdd5e..d0945fe 100644 --- a/handlers.go +++ b/handlers.go @@ -104,7 +104,7 @@ func (app *Application) lastUploadedHandler(w http.ResponseWriter, r *http.Reque http.Error(w, "No new files uploaded yet", http.StatusNotFound) return } - http.ServeFile(w, r, app.lastUploadedFile) + DisplayFile(app, "/"+app.lastUploadedFile, w) } func (app *Application) uploadHandler(w http.ResponseWriter, r *http.Request) {